All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.rmi.server.RemoteObject | +----java.rmi.server.RemoteServer | +----java.rmi.activation.Activatable
Activatable
class provides support for remote
objects that require persistent access over time and that
can be activated by the system.
exportObject
method may be invoked explicitly
by an "activatable" object, that does not extend the
Activatable
class, in order to both a) register
the object's activation descriptor, constructed from the supplied
source
, and data
, with
the activation system (so the object can be activated), and
b) export the remote object, obj
, on a specific
port (if port=0, then an anonymous port is chosen).
id
is currently inactive.
id
.
protected Activatable(CodeSource source, MarshalledObject data, int port) throws ActivationException, RemoteException
ActivationID
), and
MarshalledObject
).
A concrete subclass of this class must call this constructor to register and export the object during initial construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port if port=0) to the RMI runtime so that it is available to accept incoming calls from clients.
protected Activatable(ActivationID id, int port) throws RemoteException
ActivationID
), and
MarshalledObject
).
A concrete subclass of this class must call this constructor when it is
activated via the two parameter constructor described above. As
a side-effect of construction, the remote object is "exported"
to the RMI runtime (on the specified port
) and is
available to accept incoming calls from clients.
protected ActivationID getID()
public static RemoteStub register(ActivationDesc desc) throws UnknownGroupException, ActivationException, RemoteException
desc
is not registered with the activation systempublic static void inactive(ActivationID id) throws UnknownObjectException, ActivationException, RemoteException
id
is currently inactive. If the object is currently
active, the object is forcibly "unexported" from the RMI runtime
so the that it can no longer receive incoming calls. This call
informs this VM's ActivationGroup that the object is inactive,
that, in turn, informs its ActivationMonitor. After this call
completes, subsequent activate request to the activator will
cause the object to reactivate.
public static void unregister(ActivationID id) throws UnknownObjectException, ActivationException, RemoteException
id
. An object can no longer be
activated via that id
.
id
) is unknownpublic static ActivationID exportObject(Remote obj, CodeSource source, MarshalledObject data, int port) throws UnknownGroupException, ActivationException, RemoteException
exportObject
method may be invoked explicitly
by an "activatable" object, that does not extend the
Activatable
class, in order to both a) register
the object's activation descriptor, constructed from the supplied
source
, and data
, with
the activation system (so the object can be activated), and
b) export the remote object, obj
, on a specific
port (if port=0, then an anonymous port is chosen). Once the
object is exported, it can receive incoming RMI calls.
This method does not need to be called if obj
extends Activatable
, since the first constructor
calls this method.
public static RemoteStub exportObject(Remote obj, ActivationID id, int port) throws RemoteException
port
is zero.
During activation, this exportObject
method should
be invoked explicitly by an "activatable" object, that does not
extend the Activatable
class. There is no need for objects
that do extend the Activatable
class to invoke this
method directly; this method is called by the second constructor
above (which a subclass should invoke from its special activation
constructor).
protected static RemoteStub exportObject(Remote obj, String refType, Class[] params, Object[] args) throws RemoteException
All Packages Class Hierarchy This Package Previous Next Index