Save This Page
Home » openjdk-7 » sun.rmi » server » [javadoc | source]
sun.rmi.server
public class: UnicastRef [javadoc | source]
java.lang.Object
   sun.rmi.server.UnicastRef

All Implemented Interfaces:
    RemoteRef

Direct Known Subclasses:
    UnicastServerRef, UnicastServerRef2, ActivatableServerRef, UnicastRef2

NOTE: There is a JDK-internal dependency on the existence of this class's getLiveRef method (as it is inherited by UnicastRef2) in the implementation of javax.management.remote.rmi.RMIConnector.
Field Summary
public static final  Log clientRefLog    Client-side transport log. 
public static final  Log clientCallLog    Client-side call log. 
protected  LiveRef ref     
Constructor:
 public UnicastRef() 
 public UnicastRef(LiveRef liveRef) 
    Create a new Unicast RemoteRef.
Method from sun.rmi.server.UnicastRef Summary:
done,   getLiveRef,   getRefClass,   invoke,   invoke,   logClientCall,   marshalCustomCallData,   marshalValue,   newCall,   readExternal,   remoteEquals,   remoteHashCode,   remoteToString,   unmarshalValue,   writeExternal
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.rmi.server.UnicastRef Detail:
 public  void done(RemoteCall call) throws RemoteException 
    Done should only be called if the invoke returns successfully (non-exceptionally) to the stub. It allows the remote reference to clean up (or reuse) the connection.
 public LiveRef getLiveRef() 
    Returns the current value of this UnicastRef's underlying LiveRef. NOTE: There is a JDK-internal dependency on the existence of this method (as it is inherited by UnicastRef) in the implementation of javax.management.remote.rmi.RMIConnector.
 public String getRefClass(ObjectOutput out) 
    Returns the class of the ref type to be serialized
 public  void invoke(RemoteCall call) throws Exception 
    Invoke makes the remote call present in the RemoteCall object. Invoke will raise any "user" exceptions which should pass through and not be caught by the stub. If any exception is raised during the remote invocation, invoke should take care of cleaning up the connection before raising the "user" or remote exception.
 public Object invoke(Remote obj,
    Method method,
    Object[] params,
    long opnum) throws Exception 
    Invoke a method. This form of delegating method invocation to the reference allows the reference to take care of setting up the connection to the remote host, marshalling some representation for the method and parameters, then communicating the method invocation to the remote host. This method either returns the result of a method invocation on the remote object which resides on the remote host or throws a RemoteException if the call failed or an application-level exception if the remote invocation throws an exception.
  void logClientCall(Object obj,
    Object method) 
    Log the details of an outgoing call. The method parameter is either of type java.lang.reflect.Method or java.rmi.server.Operation.
 protected  void marshalCustomCallData(ObjectOutput out) throws IOException 
 protected static  void marshalValue(Class type,
    Object value,
    ObjectOutput out) throws IOException 
    Marshal value to an ObjectOutput sink using RMI's serialization format for parameters or return values.
 public RemoteCall newCall(RemoteObject obj,
    Operation[] ops,
    int opnum,
    long hash) throws RemoteException 
    Create an appropriate call object for a new call on this object. Passing operation array and index, allows the stubs generator to assign the operation indexes and interpret them. The RemoteRef may need the operation to encode in for the call.
 public  void readExternal(ObjectInput in) throws ClassNotFoundException, IOException 
    Read in external representation for remote ref.
 public boolean remoteEquals(RemoteRef sub) 
    default implementation of equals for remote objects
 public int remoteHashCode() 
    default implementation of hashCode for remote objects
 public String remoteToString() 
    Method from object, forward from RemoteObject
 protected static Object unmarshalValue(Class type,
    ObjectInput in) throws ClassNotFoundException, IOException 
    Unmarshal value from an ObjectInput source using RMI's serialization format for parameters or return values.
 public  void writeExternal(ObjectOutput out) throws IOException 
    Write out external representation for remote ref.