Package java.rmi

Examples of java.rmi.MarshalledObject$MarshalledObjectOutputStream


   */
  private void writeObject(ObjectOutputStream stream)
      throws IOException
  {
      stream.defaultWriteObject();
      stream.writeObject(new MarshalledObject(target));
  }
View Full Code Here


   */
  private void readObject(ObjectInputStream stream)
      throws IOException, ClassNotFoundException
  {
      stream.defaultReadObject();
      MarshalledObject mo = (MarshalledObject)stream.readObject();
      try {
    target = (RemoteEventListener)mo.get();
      } catch (Throwable e) {
    if (e instanceof Error &&
        !(e instanceof LinkageError ||
          e instanceof OutOfMemoryError ||
          e instanceof StackOverflowError))
View Full Code Here

        ObjectOutputStream oos = null;
        try {
            oos = new ObjectOutputStream(
                new BufferedOutputStream(
                    new FileOutputStream(cookieFile)));
            oos.writeObject(new MarshalledObject(obj));
            oos.flush();
//TODO - file sync?
  } catch (IOException e) {
            cookieFile.delete();
            throw (IOException)e.fillInStackTrace();
View Full Code Here

        try {
//TODO - lock out strategy for concurrent r/w file access
            ois = new ObjectInputStream(
                      new BufferedInputStream(
                         new FileInputStream(cookieFile)));
            MarshalledObject mo = (MarshalledObject)ois.readObject();
      obj = (ActivationGroupID)mo.get();
        } finally {
            if (ois != null) ois.close();
        }
        return obj;
    }
View Full Code Here

      }
                 
            logger.log(Level.FINEST, "Proxy =  {0}", proxy);
      curThread.setContextClassLoader(oldClassLoader);
//TODO - factor in code integrity for MO
            proxy = (new MarshalledObject(proxy)).get();
  } finally {
      curThread.setContextClassLoader(oldClassLoader);
  }
       
        if(proxy != null) {
View Full Code Here

        // and when we unpack to discard attributes who's codebase
        // has been lost without throwing away those we can still deal with.
        
        out.writeInt(attributes.length);
        for (int i=0; i<attributes.length; i++) {
            out.writeObject(new MarshalledObject(attributes[i]));
  }
    }
View Full Code Here

    {
        final List entries = new java.util.LinkedList();
        final int objectCount = in.readInt();
        for (int i=0; i<objectCount; i++) {
            try {
                MarshalledObject mo = (MarshalledObject)in.readObject();
                entries.add(mo.get());
            } catch (IOException e) {
                if(initlogger.isLoggable(Levels.HANDLED)) {
              initlogger.log(Levels.HANDLED,
        "Exception getting service attribute ... skipping", e);
    }
View Full Code Here

        // and when we unpack to discard attributes who's codebase
        // has been lost without throwing away those we can still deal with.
        
        out.writeInt(attributes.length);
        for (int i=0; i<attributes.length; i++) {
            out.writeObject(new MarshalledObject(attributes[i]));
  }
    }
View Full Code Here

    {
        final List entries = new java.util.LinkedList();
        final int objectCount = in.readInt();
        for (int i=0; i<objectCount; i++) {
            try {
                MarshalledObject mo = (MarshalledObject)in.readObject();
                entries.add(mo.get());
            } catch (IOException e) {
    logger.log(Level.INFO, "Encountered IOException recovering " +
                    "attribute, dropping attribute", e);
            } catch (ClassNotFoundException e) {
    logger.log(Level.INFO, "Encountered ClassNotFoundException " +
View Full Code Here

  throws ActivationException, RemoteException
    {
        logger.entering(ActivateWrapper.class.getName(),
      "register", new Object[] { gid, desc, Boolean.valueOf(restart), sys });

  MarshalledObject data;
  try {
      data = new MarshalledObject(desc);
  } catch (Exception e) {
            MarshalException me =
          new MarshalException("marshalling ActivateDesc", e);
      logger.throwing(ActivateWrapper.class.getName(),
          "register", me);
View Full Code Here

TOP

Related Classes of java.rmi.MarshalledObject$MarshalledObjectOutputStream

Copyright © 2018 www.massapicom. 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.