Package java.rmi.server

Examples of java.rmi.server.ObjID


      if (type == TransportConstants.Call) {
        log.log (Level.FINEST, "Handling remote method call");
        ProxyInputStream objIn = new ProxyInputStream (in);

        //Read the call header
        ObjID objId = ObjID.read (objIn);
        log.log (Level.FINER, "Read object id of " + objId.toString ());
        int opNum = objIn.readInt ();
        log.log (Level.FINER, "Read op num of " + Integer.toString (opNum));
        long hash = objIn.readLong ();       
        log.log (Level.FINER, "Read hash code of " + Long.toString (hash, 16));

        if (objId.equals (REGISTRY_OID)) {
          if (opNum == REGISTRY_OP_BIND) {
            log.log (Level.FINE, "Handling call to Registry.bind()");
            processBindCall (objIn, out);
          }
          else if (opNum == REGISTRY_OP_LIST) {
            log.log (Level.FINE, "Handling call to Registry.list()");
            processListCall (objIn, out);
          }
          else if (opNum == REGISTRY_OP_LOOKUP) {
            log.log (Level.FINE, "Handling call to Registry.lookup()");
            processLookupCall (objIn, out);
          }
          else if (opNum == REGISTRY_OP_REBIND) {
            log.log (Level.FINE, "Handling call to Registry.rebind()");
            processRebindCall (objIn, out);
          }
          else if (opNum == REGISTRY_OP_UNBIND) {
            log.log (Level.FINE, "Handling call to Registry.unbind()");
            processUnbindCall (objIn, out);
          }
        }
        else if (objId.equals (DGC_OID)) {
          if (opNum == DGC_OP_CLEAN) {
            log.log (Level.FINE, "Handling call to DGC.clean()");
            processCleanCall (objIn, out);
          }
          else if (opNum == DGC_OP_DIRTY) {
            log.log (Level.FINE, "Handling call to DGC.dirty()");
            processDirtyCall (objIn, out);
          }
        }
        else if (objId.equals (ref.getObjID ())) {
          processCall (objIn, out, opNum, hash);
        }
      }
      else if (type == TransportConstants.Ping) {
        //Acknowledge the ping
View Full Code Here


    log.entering ("com.sun.grid.jgrid.proxy.ComputeProxy", "writeJobToDisk");
   
    log.log (Level.FINEST, "Opening file for writing");
    File file = new File (jobPath + job.getJobId ());
    ObjectOutputStream oos = new ProxyOutputStream (new FileOutputStream (file));
    ObjID tempId = new ObjID (0);
   
    job.setFilename (file.getAbsolutePath ());
    ((ProxyOutputStream)oos).setAnnotation (annotation);
   
    log.log (Level.FINEST, "Writing job file");
View Full Code Here

     */
    public ActivatableServerRef(ActivationID aid,
                                int port,
                                RMIClientSocketFactory csf,
                                RMIServerSocketFactory ssf) {
        super(port, csf, ssf, new ObjID());
        this.aid = aid;
    }
View Full Code Here

     * Constructs UnicastServerRef listening on the port specified.
     *
     * @param port port where this UnicastServerRef will listen for connections
     */
    public UnicastServerRef(int port) {
        this(port, null, null, new ObjID());
    }
View Full Code Here

     * @param ssf server-side socket factory for creating server sockets
     */
    public UnicastServerRef(int port,
                            RMIClientSocketFactory csf,
                            RMIServerSocketFactory ssf) {
        this(port, csf, ssf, new ObjID());
    }
View Full Code Here

                // rmi.log.39=Creating Activation System on port {0}.
                rLog.log(commonDebugLevel, Messages.getString("rmi.log.39", //$NON-NLS-1$
                        port));

                UnicastServerRef usr = new UnicastServerRef(port, null,
                        null, new ObjID(RMIConstants.ACTIVATION_SYSTEM_ID));

                thisStub = ExportManager.exportObject(this, usr, false);
                // rmi.log.3A=stub's ref = {0}
                rLog.log(commonDebugLevel, Messages.getString("rmi.log.3A", //$NON-NLS-1$
                        ((RemoteObject) thisStub).getRef()));
View Full Code Here

            // wait until RMI call msg is received from client or until client
            // closes the connection
            while (waitCallMsg() != -1) {
                RMIObjectInputStream oin = new RMIObjectInputStream(in);
                final ServerRemoteCall sCall = new ServerRemoteCall(this, oin);
                ObjID id = null;

                try {
                    id = ObjID.read(oin);
                } catch (IOException ioe) {
                    // rmi.74=Unable to read Object ID
View Full Code Here

         * @return true if this RenewInfo already contained the given ref and
         *         false otherwise
         */
        boolean addToDirtySet(RemoteRefBase ref) {
            synchronized (tablesLock) {
                ObjID id = ref.getObjId();

                if (renewTable.containsKey(id)) {
                    return true;
                }
                renewTable.put(id, new PhantomRef(
View Full Code Here

     */
    public RegistryService(ORB orb) throws RemoteException {
        if (orb == null) {
            throw new IllegalArgumentException("Argument 'orb' is null");
        }
        orb.exportObject(_registry, new ObjID(ObjID.REGISTRY_ID));
    }
View Full Code Here

     * @param in the stream to read from. This is responsible for its closure.
     * @return the deserialized request
     * @throws IOException for any I/O error
     */
    public static Request read(ObjectInput in) throws IOException {
        ObjID objID = ObjID.read(in);
        long methodID = in.readLong();
        return new Request(null, objID, methodID, in);
    }
View Full Code Here

TOP

Related Classes of java.rmi.server.ObjID

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.