| org.apache.harmony.rmi.remoteref.UnicastRef org.apache.harmony.rmi.remoteref.UnicastServerRef
All known Subclasses: org.apache.harmony.rmi.remoteref.UnicastServerRef2,
UnicastServerRef | public class UnicastServerRef extends UnicastRef implements ServerRef(Code) | | Implementation of server-side handle for remote objects.
author: Mikhail A. Markov version: $Revision: 1.1.2.2 $ |
Field Summary | |
protected boolean | isSystem True if the handled remote object is system. | protected ServerConnectionManager | mgr ServerConnectionManager accepting connections for this ServerRef. | protected RMIReference | ref Implementation which this handle refers to. | protected Map | remoteMethods Map with remote methods. | protected Skeleton | skel Skeleton for this remote object if we use RMI protocol 1.1 or null
if we use RMI protocol 1.2. |
isSystem | protected boolean isSystem(Code) | | True if the handled remote object is system.
|
remoteMethods | protected Map remoteMethods(Code) | | Map with remote methods.
Methods hash codes are the keys in the table.
|
skel | protected Skeleton skel(Code) | | Skeleton for this remote object if we use RMI protocol 1.1 or null
if we use RMI protocol 1.2.
|
UnicastServerRef | public UnicastServerRef()(Code) | | Constructs default UnicastServerRef listening on anonymous port.
|
UnicastServerRef | public UnicastServerRef(int port)(Code) | | Constructs UnicastServerRef listening on the port specified.
Parameters: port - port where this UnicastServerRef will listen for connections |
UnicastServerRef | public UnicastServerRef(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)(Code) | | Constructs UnicastServerRef listening on the port specified and
having the given client and server socket factories.
Parameters: port - port where this UnicastServerRef will listen for connections Parameters: csf - client-side socket factory for creating client sockets Parameters: ssf - server-side socket factory for creating server sockets |
UnicastServerRef | public UnicastServerRef(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf, ObjID objId)(Code) | | Constructs UnicastServerRef listening on the port specified,
using specified client and server socket factories and
having the given ObjID.
Parameters: port - port where this UnicastServerRef will listen for connections Parameters: csf - client-side socket factory for creating client sockets Parameters: ssf - server-side socket factory for creating server sockets Parameters: objId - Object ID of remote object |
UnicastServerRef | public UnicastServerRef(Endpoint ep, ObjID objId)(Code) | | Constructs UnicastServerRef using specified Endpoint and ObjID.
Parameters: ep - Endpoint for remote calls Parameters: objId - Object ID of remote object |
exportObject | public Remote exportObject(Remote obj, Object data, boolean useProxyStubs, boolean startListen, boolean isSystem) throws RemoteException(Code) | | Exports remote object so it becomes available for remote calls.
Parameters: obj - remote object implementation Parameters: data - additional data needed for exporting the object (not used) Parameters: useProxyStubs - If true then Proxy stubs will be generated if stubclass could not be found in classpath and codebase; if false Proxystubs will not be tried (this is needed forUnicastRemoteObject.exportObject(Remote) method because itreturns RemoteStub class (but Proxy class could not be castedto it) Parameters: startListen - if false, ServerSocket listening thread will not bestarted (this is used for DGC, for example); otherwise listeningthread will be started and object becomes available forconnections from clients Parameters: isSystem - if true then existence of this object will not preventVM from exiting (for example, for rmiregistry) throws: RemoteException - if any exception occurred while trying to exportthe object |
getClientRef | protected UnicastRef getClientRef(Endpoint ep, ObjID objId)(Code) | | Creates client-side reference holding the given Endpoint and Object ID.
Parameters: ep - Endpoint for UnicastRef creation Parameters: objId - Object ID for UnicastRef creation created client-sice reference |
getSkelInstance | protected Skeleton getSkelInstance(Class c)(Code) | | Loads and instantiates skel class for the given remote class.
Parameters: c - Class whose skel should be loaded and instantiated created skel class or null if any Exception occurred duringskel loading or instantiating |
isSystem | public boolean isSystem()(Code) | | Returns true if the handled Remote object is system and false otherwise.
true if the handled Remote object is system and false otherwise |
loadStubClass | protected Class loadStubClass(Class c, boolean throwException) throws StubNotFoundException(Code) | | Loads stub class for the given remote class.
Parameters: c - Class whose stub should be loaded Parameters: throwException - should we throw StubNotFoundException in case offailure or silently return null loaded stub or null if throwException is false and any failureoccurred during stub loading throws: StubNotFoundException - if throwException parameter is true and anyfailure occurred during stub loading |
processCall | public void processCall(RemoteCall call) throws IOException(Code) | | Performs actual remote method invocation.
Parameters: call - RemoteCall throws: IOException - if any I/O error occurred during remote method call |
unexportObject | public boolean unexportObject(boolean force)(Code) | | Returns true if force parameter is false and there are no in-progress
calls to the object handled by this ref and false otherwise. This method
could be overridden by subclasses to "really" unexport handled object.
Parameters: force - if true then we may not care about active calls true if force parameter is false and there are no in-progresscalls to the object handled by this ref and false otherwise |
writeExternal | public void writeExternal(ObjectOutput out) throws IOException(Code) | | For this type of ref no additional data is written to the stream.
|
Fields inherited from org.apache.harmony.rmi.remoteref.UnicastRef | final public static RMILog clientCallsLog(Code)(Java Doc)
|
|
|