Ja.NET Standard Edition 5.0

Documentation API Specification

Contents

ExportManager Class Reference

List of all members.


Detailed Description

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

Static Public Member Functions

static Remote exportObject (Remote obj, UnicastServerRef sref, boolean useProxyStubs) throws RemoteException
 Exports specified remote object through pre-initialized UnicastServerRef.
static Remote exportObject (Remote obj, UnicastServerRef sref, boolean useProxyStubs, boolean startListen, boolean isSystem) throws RemoteException
 Exports specified remote object through pre-initialized UnicastServerRef.
static boolean unexportObject (Remote obj, boolean force) throws NoSuchObjectException
 Unexports specified remote object so it becomes unavailable for receiving remote calls.
static Remote getStub (Remote obj) throws NoSuchObjectException
 Returns stub for specified remote object, or throws NoSuchObjectException if object was not exported via this class.
static boolean isExported (Remote obj)
 Returns true if specified remote object was exported via this class.

Static Package Functions

 [static initializer]
static RMIObjectInfo getInfo (ObjID id)
static void addActiveCall ()
static void removeActiveCall ()

Static Private Member Functions

static void scavInterrupt ()

Static Private Attributes

static RMIObjectTable exportedObjs = new RMIObjectTable()
static DGC dgcImpl = new DGCImpl()
static ReferenceQueue dgcQueue = new ReferenceQueue()
static Thread scav
static int activeCallsNum = 0
static int nonSystemObjsNum = 0
static Object callsLock = new CallsLock()

Classes

class  CallsLock
class  Scavenger

Member Function Documentation

[static initializer] (  )  [static, package]

static Remote exportObject ( Remote  obj,
UnicastServerRef  sref,
boolean  useProxyStubs 
) throws RemoteException [static]

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
sref initialized UnicastServerRef to export object through
useProxyStubs If true then Proxy stubs will be generated if stub class could not be found in classpath and codebase; if false Proxy stubs will not be tried (this is needed for UnicastRemoteObject.exportObject(Remote) method because it returns RemoteStub class (but Proxy class could not be casted to it)
Returns:
stub for exported object
Exceptions:
RemoteException if any exception occurred while exporting specified remote object

static Remote exportObject ( Remote  obj,
UnicastServerRef  sref,
boolean  useProxyStubs,
boolean  startListen,
boolean  isSystem 
) throws RemoteException [static]

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
sref initialized UnicastServerRef to export object through
useProxyStubs If true then Proxy stubs will be generated if stub class could not be found in classpath and codebase; if false Proxy stubs will not be tried (this is needed for UnicastRemoteObject.exportObject(Remote) method because it returns RemoteStub class (but Proxy class could not be casted to it)
startListen if false, ServerSocket listening thread will not be started (this is used for DGC, for example); otherwise listening thread will be started and object becomes available for connections from clients
isSystem if true then existence of this object will not prevent VM from exiting (for example, for rmiregistry)
Returns:
stub for exported object
Exceptions:
RemoteException if any exception occurred while exporting specified remote object

static boolean unexportObject ( Remote  obj,
boolean  force 
) throws NoSuchObjectException [static]

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
force if false then specified object will only be unexported if there are no pending or in-progress calls to it; otherwise the object will be unexported forcibly (even if there are such calls)
Exceptions:
NoSuchObjectException if specified object has not been exported or has already been unexported

static Remote getStub ( Remote  obj  )  throws NoSuchObjectException [static]

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
Returns:
stub for specified remote object if it was exported
Exceptions:
NoSuchObjectException if specified object was not exported via this class

static boolean isExported ( Remote  obj  )  [static]

Returns true if specified remote object was exported via this class.

Parameters:
obj remote object to check
Returns:
true if specified remote object was exported via this class

static RMIObjectInfo getInfo ( ObjID  id  )  [static, package]

static void addActiveCall (  )  [static, package]

static void removeActiveCall (  )  [static, package]

static void scavInterrupt (  )  [static, private]


Member Data Documentation

RMIObjectTable exportedObjs = new RMIObjectTable() [static, private]

DGC dgcImpl = new DGCImpl() [static, private]

ReferenceQueue dgcQueue = new ReferenceQueue() [static, private]

Thread scav [static, private]

int activeCallsNum = 0 [static, private]

int nonSystemObjsNum = 0 [static, private]

Object callsLock = new CallsLock() [static, private]