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

All Implemented Interfaces:
    Dispatcher, ServerRef, RemoteRef

Direct Known Subclasses:
    UnicastServerRef2, ActivatableServerRef

UnicastServerRef implements the remote reference layer server-side behavior for remote objects exported with the "UnicastRef" reference type.
Field Summary
public static final  boolean logCalls    value of server call log property 
public static final  Log callLog    server call log 
Fields inherited from sun.rmi.server.UnicastRef:
clientRefLog,  clientCallLog,  ref
Constructor:
 public UnicastServerRef() 
 public UnicastServerRef(LiveRef ref) 
    Construct a Unicast server remote reference for a specified liveRef.
 public UnicastServerRef(int port) 
 public UnicastServerRef(boolean forceStubUse) 
Method from sun.rmi.server.UnicastServerRef Summary:
clearStackTraces,   dispatch,   exportObject,   exportObject,   getClientHost,   getClientRef,   getRefClass,   oldDispatch,   readExternal,   setSkeleton,   unmarshalCustomCallData,   writeExternal
Methods from sun.rmi.server.UnicastRef:
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.UnicastServerRef Detail:
 public static  void clearStackTraces(Throwable t) 
    Clear the stack trace of the given Throwable by replacing it with an empty StackTraceElement array, and do the same for all of its chained causative exceptions.
 public  void dispatch(Remote obj,
    RemoteCall call) throws IOException 
    Call to dispatch to the remote object (on the server side). The up-call to the server and the marshalling of return result (or exception) should be handled before returning from this method.
 public RemoteStub exportObject(Remote impl,
    Object data) throws RemoteException 
    With the addition of support for dynamic proxies as stubs, this method is obsolete because it returns RemoteStub instead of the more general Remote. It should not be called. It sets the 'forceStubUse' flag to true so that the stub for the exported object is forced to be an instance of the pregenerated stub class, which extends RemoteStub. Export this object, create the skeleton and stubs for this dispatcher. Create a stub based on the type of the impl, initialize it with the appropriate remote reference. Create the target defined by the impl, dispatcher (this) and stub. Export that target via the Ref.
 public Remote exportObject(Remote impl,
    Object data,
    boolean permanent) throws RemoteException 
    Export this object, create the skeleton and stubs for this dispatcher. Create a stub based on the type of the impl, initialize it with the appropriate remote reference. Create the target defined by the impl, dispatcher (this) and stub. Export that target via the Ref.
 public String getClientHost() throws ServerNotActiveException 
    Return the hostname of the current client. When called from a thread actively handling a remote method invocation the hostname of the client is returned.
 protected RemoteRef getClientRef() 
    Return the client remote reference for this remoteRef. In the case of a client RemoteRef "this" is the answer. For a server remote reference, a client side one will have to found or created.
 public String getRefClass(ObjectOutput out) 
    Returns the class of the ref type to be serialized.
 public  void oldDispatch(Remote obj,
    RemoteCall call,
    int op) throws IOException 
    Handle server-side dispatch using the RMI 1.1 stub/skeleton protocol, given a non-negative operation number that has already been read from the call stream.
 public  void readExternal(ObjectInput in) throws ClassNotFoundException, IOException 
    Read in external representation for remote ref.
 public  void setSkeleton(Remote impl) throws RemoteException 
    Discovers and sets the appropriate skeleton for the impl.
 protected  void unmarshalCustomCallData(ObjectInput in) throws ClassNotFoundException, IOException 
 public  void writeExternal(ObjectOutput out) throws IOException 
    Write out external representation for remote ref.