| java.lang.Object org.apache.harmony.rmi.server.ExportManager
ExportManager | public class ExportManager (Code) | | Manager controlling all exported objects.
It is put to org.apache.harmony.rmi.transport package because some methods
should be made package protected.
author: Mikhail A. Markov version: $Revision: 1.1.2.3 $ |
Method Summary | |
static void | addActiveCall() | public static Remote | exportObject(Remote obj, UnicastServerRef sref, boolean useProxyStubs) Exports specified remote object through pre-initialized UnicastServerRef.
Returns info for exported object. | public static Remote | exportObject(Remote obj, UnicastServerRef sref, boolean useProxyStubs, boolean startListen, boolean isSystem) Exports specified remote object through pre-initialized UnicastServerRef.
Returns info for exported object. | static RMIObjectInfo | getInfo(ObjID id) | public static Remote | getStub(Remote obj) Returns stub for specified remote object, or throws NoSuchObjectException
if object was not exported via this class. | public static boolean | isExported(Remote obj) Returns true if specified remote object was exported via this class. | static void | removeActiveCall() | public static boolean | unexportObject(Remote obj, boolean force) Unexports specified remote object so it becomes unavailable for
receiving remote calls. |
addActiveCall | static void addActiveCall()(Code) | | |
exportObject | public static Remote exportObject(Remote obj, UnicastServerRef sref, boolean useProxyStubs) throws RemoteException(Code) | | Exports specified remote object through pre-initialized UnicastServerRef.
Returns info for exported object. If object has already been exported,
ExportException will be thrown. The thread listening for incoming
connections will be started.
Parameters: obj - remote object to be exported Parameters: sref - initialized UnicastServerRef to export object through 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) stub for exported object throws: RemoteException - if any exception occurred while exportingspecified remote object |
exportObject | public static Remote exportObject(Remote obj, UnicastServerRef sref, boolean useProxyStubs, boolean startListen, boolean isSystem) throws RemoteException(Code) | | Exports specified remote object through pre-initialized UnicastServerRef.
Returns info for exported object. If object has already been exported,
ExportException will be thrown.
Parameters: obj - remote object to be exported Parameters: sref - initialized UnicastServerRef to export object through 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) stub for exported object throws: RemoteException - if any exception occurred while exportingspecified remote object |
getStub | public static Remote getStub(Remote obj) throws NoSuchObjectException(Code) | | Returns stub for specified remote object, or throws NoSuchObjectException
if object was not exported via this class.
Parameters: obj - remote object for which stub is needed stub for specified remote object if it was exported throws: NoSuchObjectException - if specified object was not exported viathis class |
isExported | public static boolean isExported(Remote obj)(Code) | | Returns true if specified remote object was exported via this class.
Parameters: obj - remote object to check true if specified remote object was exported via this class |
removeActiveCall | static void removeActiveCall()(Code) | | |
unexportObject | public static boolean unexportObject(Remote obj, boolean force) throws NoSuchObjectException(Code) | | Unexports specified remote object so it becomes unavailable for
receiving remote calls. If force parameter is false then the object will
be unexported only if there are no pending or in-progress remote calls
to it, otherwise (if force parameter is true) the object will be
unexported forcibly.
Parameters: obj - remote object to be unexported Parameters: force - if false then specified object will only be unexported ifthere are no pending or in-progress calls to it; otherwisethe object will be unexported forcibly (even if there are suchcalls) throws: NoSuchObjectException - if specified object has not been exportedor has already been unexported |
|
|