Package sun.rmi.server

Examples of sun.rmi.server.MarshalOutputStream


    //Write message type
    log.log (Level.FINEST, "Writing return header");
    out.writeByte (TransportConstants.Return);

    MarshalOutputStream objOut = new MarshalOutputStream (out);

    //Write return header
    objOut.writeByte (TransportConstants.NormalReturn);
    uid.write (objOut);
   
    //Write a stub that points back to this port
    log.log (Level.FINEST, "Writing new stub");
    /* This used to write out a new stub, but since I've removed the stub code
     * from the source base, I'm just writing out null here so I can get it to
     * compile.  This won't work, but this class has been deprecated, so I don't
     * really care. */
    objOut.writeObject (null);

    objOut.flush ();
   
    log.exiting ("com.sun.grid.jgrid.proxy.ComputeProxy", "processLookupCall");
  }
View Full Code Here


    //Write message type
    log.log (Level.FINEST, "Writing return header");
    out.writeByte (TransportConstants.Return);

    MarshalOutputStream objOut = new MarshalOutputStream (out);

    //Write message header
    objOut.writeByte (TransportConstants.NormalReturn);
    uid.write (objOut);
   
    /* We don't do anything with this call because we don't have any actual
     * objects to keep track of. */

    objOut.flush ();
   
    log.exiting ("com.sun.grid.jgrid.proxy.ComputeProxy", "processCleanCall");
  }
View Full Code Here

    //Write message type
    log.log (Level.FINEST, "Writing return header");
    out.writeByte (TransportConstants.Return);

    MarshalOutputStream objOut = new MarshalOutputStream (out);

    //Write message header
    objOut.writeByte (TransportConstants.NormalReturn);
    uid.write (objOut);

    //If the lease we were passed has a valid VM ID, write it
    if (lease.getVMID () != null) {
      log.log (Level.FINEST, "Writing old lease object");
      objOut.writeObject (lease);
    }
    //If not, create a valid lease and write it
    else {
      log.log (Level.FINEST, "Writing new lease object");
      objOut.writeObject (new Lease (new VMID (), lease.getValue ()));
    }

    objOut.flush ();
   
    log.exiting ("com.sun.grid.jgrid.proxy.ComputeProxy", "processDirtyCall");
  }
View Full Code Here

    //Write message type
    log.log (Level.FINEST, "Writing return header");
    out.writeByte (TransportConstants.Return);

    MarshalOutputStream objOut = new MarshalOutputStream (out);

    //Write message header
    if (returnValue instanceof Throwable) {
      log.log (Level.FINER, "Exceptional return");
      objOut.writeByte (TransportConstants.ExceptionalReturn);

      //If the exception is a RemoteException, wrap it in a RemoteException
      if (!(returnValue instanceof RemoteException)) {
        log.log (Level.FINEST, "Wrapping exception in RemoteException");
        returnValue = new RemoteException ("An error occured while processing the Computable object", (Throwable)returnValue);
      }
    }
    else {
      log.log (Level.FINER, "Normal return");
      objOut.writeByte (TransportConstants.NormalReturn);
    }

    uid.write (objOut);
   
    //Write results
    log.log (Level.FINEST, "Writing results");
    objOut.writeObject (returnValue);

    objOut.flush ();
   
    log.exiting ("com.sun.grid.jgrid.proxy.ComputeProxy", "processComputeCall");
  }
View Full Code Here

   
    //Write message type
    log.log (Level.FINEST, "Writing return header");
    out.writeByte (TransportConstants.Return);

    MarshalOutputStream objOut = new MarshalOutputStream (out);

    //Write message header
    objOut.writeByte (TransportConstants.NormalReturn);
    uid.write (objOut);
   
    //Write results
    log.log (Level.FINEST, "Writing results");
    if (lock instanceof Lock) {
      log.log (Level.FINE, "Process is not complete");
      objOut.writeObject (null);
    }
    else {
      log.log (Level.FINE, "Process is complete");
      objOut.writeObject (lock);
      lockbox.remove (id);
    }
   
    objOut.flush ();

    log.log (Level.FINER, "Deleting job file");
    this.deleteJob (id);
   
    log.exiting ("com.sun.grid.jgrid.proxy.ComputeProxy", "processGetResultsCall");
View Full Code Here

   
    //Write message type
    log.log (Level.FINEST, "Writing return header");
    out.writeByte (TransportConstants.Return);

    MarshalOutputStream objOut = new MarshalOutputStream (out);

    //Write message header
    objOut.writeByte (TransportConstants.NormalReturn);
    uid.write (objOut);
   
    //Write results
    log.log (Level.FINEST, "Writing results");
    if (lock instanceof Lock) {
      log.log (Level.FINE, "Process is not complete");
      objOut.writeBoolean (false);
    }
    else {
      log.log (Level.FINE, "Process is complete");
      objOut.writeBoolean (true);
    }
   
    objOut.flush ();
   
    log.exiting ("com.sun.grid.jgrid.proxy.ComputeProxy", "processIsCompleteCall");
  }
View Full Code Here

     * @param value the snapshot
     * @exception Exception can raise any exception
     */
    public
    void snapshot(OutputStream out, Object value) throws Exception {
        MarshalOutputStream s = new MarshalOutputStream(out);
        s.writeObject(value);
        s.flush();
    }
View Full Code Here

     * @exception Exception can raise any exception
     */
    public
    void writeUpdate(LogOutputStream out, Object value) throws Exception {

        MarshalOutputStream s = new MarshalOutputStream(out);
        s.writeObject(value);
        s.flush();
    }
View Full Code Here

TOP

Related Classes of sun.rmi.server.MarshalOutputStream

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.