Examples of MarshalInputStream


Examples of com.sun.corba.se.impl.encoding.MarshalInputStream

    {
        CorbaMessageMediator request = (CorbaMessageMediator) messageMediator;
        CorbaMessageMediator response = null;

        try {
            MarshalInputStream is = (MarshalInputStream)
                request.getInputObject();
            String method = request.getOperationName();
            response = request.getProtocolHandler().createResponse(request, null);
            MarshalOutputStream os = (MarshalOutputStream)
                response.getOutputObject();

            if (method.equals("get")) {
                // Get the name of the requested service
                String serviceKey = is.read_string();

                // Look it up
                org.omg.CORBA.Object serviceObject =
                    orb.getLocalResolver().resolve( serviceKey ) ;
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.MarshalInputStream

    {
        CorbaMessageMediator request = (CorbaMessageMediator) messageMediator;
        CorbaMessageMediator response = null;

        try {
            MarshalInputStream is = (MarshalInputStream)
                request.getInputObject();
            String method = request.getOperationName();
            response = request.getProtocolHandler().createResponse(request, null);
            MarshalOutputStream os = (MarshalOutputStream)
                response.getOutputObject();

            if (method.equals("get")) {
                // Get the name of the requested service
                String serviceKey = is.read_string();

                // Look it up
                org.omg.CORBA.Object serviceObject =
                    orb.getLocalResolver().resolve( serviceKey ) ;
View Full Code Here

Examples of net.jini.io.MarshalInputStream

      s.writeObject(state);
      s.flush();
  }
 
  public void recover(InputStream in) throws Exception {
      MarshalInputStream s =
    new MarshalInputStream(in,
               ActLogHandler.class.getClassLoader(),
               false, null, Collections.EMPTY_LIST);
      s.useCodebaseAnnotations();
      state = (Activation) s.readObject();
  }
View Full Code Here

Examples of net.jini.io.MarshalInputStream

      s.writeObject(value);
      s.flush();
  }

  public void readUpdate(InputStream in) throws Exception {
      MarshalInputStream  s =
    new MarshalInputStream(in,
               ActLogHandler.class.getClassLoader(),
               false, null, Collections.EMPTY_LIST);
      s.useCodebaseAnnotations();
      applyUpdate(s.readObject());
  }
View Full Code Here

Examples of net.jini.io.MarshalInputStream

          boolean integrity,
          Collection context)
          throws IOException
      {
          ClassLoader loader = getClassLoader();
          return new MarshalInputStream(
        request.getRequestInputStream(),
        loader, integrity, loader,
        Collections.unmodifiableCollection(context));
          // useStreamCodebases() not invoked
      }
View Full Code Here

Examples of net.jini.io.MarshalInputStream

      }
      streamLoader = impl.getClass().getClassLoader();
  }
 
  Collection unmodContext = Collections.unmodifiableCollection(context);
  MarshalInputStream in =
      new MarshalInputStream(request.getRequestInputStream(),
           streamLoader, integrity,
           streamLoader, unmodContext);
  in.useCodebaseAnnotations();
  return in;
    }
View Full Code Here

Examples of net.jini.io.MarshalInputStream

  if (Proxy.getInvocationHandler(proxy) != this) {
      throw new IllegalArgumentException("not proxy for this");
  }
  ClassLoader proxyLoader = getProxyLoader(proxy.getClass());
  Collection unmodContext = Collections.unmodifiableCollection(context);
  MarshalInputStream in =
      new MarshalInputStream(request.getResponseInputStream(),
           proxyLoader, integrity, proxyLoader,
           unmodContext);
  in.useCodebaseAnnotations();
  return in;
    }
View Full Code Here

Examples of net.jini.io.MarshalInputStream

                        boolean integrity,
                        Collection context)
                        throws IOException
                    {
                        ClassLoader loader = getClassLoader();
                        return new MarshalInputStream(
                            request.getRequestInputStream(),
                            loader, integrity, loader,
                            Collections.unmodifiableCollection(context));
                        // useStreamCodebases() not invoked
                    }
View Full Code Here

Examples of net.jini.io.MarshalInputStream

    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        MarshalInputStream stream;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.flush();
        ByteArrayInputStream bais =
            new ByteArrayInputStream(baos.toByteArray());
        ArrayList al = new ArrayList();
        PipedInputStream pis = new PipedInputStream();

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 1: "
            + "MarshalInputStream(null,*,*,*,null)");
        logger.log(Level.FINE,"");

        try {
            stream = new MarshalInputStream(null,null,false,null,null);
            assertion(false);
        } catch (NullPointerException ignore) {
        }

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 2: "
            + "MarshalInputStream(InputStream,*,*,*,null)");
        logger.log(Level.FINE,"");

        try {
            stream = new MarshalInputStream(bais,null,false,null,null);
            assertion(false);
        } catch (NullPointerException ignore) {
        }

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 3: "
            + "MarshalInputStream(null,*,*,*,Collection)");
        logger.log(Level.FINE,"");

        try {
            stream = new MarshalInputStream(null,null,false,null,al);
            assertion(false);
        } catch (NullPointerException ignore) {
        }

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 4: "
            + "getObjectStreamContext method returns constructor arg");
        logger.log(Level.FINE,"");

        bais.reset();
        stream = new MarshalInputStream(bais,null,false,null,al);
        assertion(stream.getObjectStreamContext() == al);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 5: "
            + "constructor throws IOException");
        logger.log(Level.FINE,"");

        try {
            stream = new MarshalInputStream(pis,null,false,null,al);
            assertion(false);
        } catch (IOException ignore) {
        }

        logger.log(Level.FINE,"=================================");
View Full Code Here

Examples of net.jini.io.MarshalInputStream

            // Attempt to read from MarshalInputStream

            ByteArrayInputStream bios = new ByteArrayInputStream(
                baos.toByteArray());
            MarshalInputStream input = new FakeMarshalInputStream(
                bios,readAnnotationException,null);

            // verify result

            try {
                System.out.println("readObject: " + input.readObject());
                throw new AssertionError("readObject() call should fail");
            } catch (Throwable caught) {
                assertion(readAnnotationException.equals(caught),
                    caught.toString());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.