java.rmi.activation
public abstract class Activatable extends RemoteServer
Constructor Summary | |
---|---|
protected | Activatable(String codebase, MarshalledObject data, boolean restart, int port)
This constructor is used to register export the object on the given port. |
protected | Activatable(String codebase, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
This constructor is used to register export the object on the given port,
additionally specifying the socket factories. |
protected | Activatable(ActivationID anId, int port)
Creates the new instance of activatable with the given activation id and is
listening at the given port. |
protected | Activatable(ActivationID anId, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Creates the new instance of activatable with the given activation id and is
listening at the given port, using the specified client and server sockets
factories. |
Method Summary | |
---|---|
static Remote | export(ActivationID id, Remote obj, int port, RMIServerSocketFactory serverSocketFactory)
Create and export the new remote object, making it available at the given
port, using sockets, produced by the specified factories.
|
static ActivationID | exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port)
Register and export the object that activatable object that is not derived
from the Activatable super class. |
static ActivationID | exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Register and export the object that activatable object that is not derived
from the Activatable super class. |
static Remote | exportObject(Remote obj, ActivationID id, int port)
During activation, this exportObject method should be invoked explicitly by
the activatable object, that does is not derived from the Activatable
class. |
static Remote | exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
During activation, this exportObject method should be invoked explicitly by
the activatable object, that does is not derived from the Activatable
class. |
protected ActivationID | getID()
Get the objects activation identifier.
|
static boolean | inactive(ActivationID id)
Inactivates and unexports the object. |
static ObjID | makeId(ActivationID aid)
Make the object ID from the activation ID. |
static Remote | register(ActivationDesc desc)
This method registers an activatable object. |
static boolean | unexportObject(Remote obj, boolean force)
Make the remote object unavailable for incoming calls. |
static void | unregister(ActivationID id)
Unregister the object (the object will no longer be activable with that id)
|
Parameters: codebase the object code base url data the data, needed to activate the object. restart specifies reactivation mode after crash. If true, the object is activated when activator is restarted or the activation group is restarted. If false, the object is only activated on demand. This flag does has no effect during the normal operation (the object is normally activated on demand). port the port, on which the object will become available. The value 0 means anonymous port.
Throws: ActivationException if the activation failed RemoteException if the remote call failed.
Parameters: codebase the object code base url data the data, needed to activate the object. restart specifies reactivation mode after crash. If true, the object is activated when activator is restarted or the activation group is restarted. If false, the object is only activated on demand. This flag does has no effect during the normal operation (the object is normally activated on demand). port the port, on which the object will become available. The value 0 means anonymous port. csf the client socket factory ssf the server socket factory
Throws: ActivationException if the activation failed RemoteException if the remote call failed.
Parameters: anId the activation id port the port, on which the activatable will be listening
Throws: RemoteException if the activation failed.
Parameters: anId the activation id port the port, on which the activatable will be listening csf the client socket factory ssf the server socket factory
Throws: RemoteException if the remote call failed
Parameters: port the port, on that the object should become available. Zero means anonymous port. serverSocketFactory the server socket factory
Parameters: obj the object, that is exported, becoming available at the given port. location the object code location (codebase). data the data, needed to activate the object restart the restart mode port the port, where the object will be available
Returns: the created object activation ID.
Throws: ActivationException if the activation group is not active RemoteException if the registration or export fails
Parameters: obj the object, that is exported, becoming available at the given port. location the object code location (codebase). data the data, needed to activate the object restart the restart mode port the port, where the object will be available csf the client socket factory ssf the server socket factory
Returns: the created object activation ID.
Throws: ActivationException if the activation group is not active RemoteException if the registration or export fails
Parameters: obj the object id the known activation id port the object port
Returns: the remote stub of the activatable object
Throws: RemoteException if the object export fails
Parameters: obj the object id the known activation id port the object port csf the client socket factory ssf the server socket factory
Returns: the remote stub of the activatable object
Throws: RemoteException if the object export fails
Returns: the object activation identifier
Parameters: id the id of the object being inactivated
Returns: true if the object has been inactivated, false if it has not been inactivated because of the running or pending calls.
Throws: UnknownObjectException if the object is unknown. ActivationException if the object group is not active RemoteException if the remote call fails
Parameters: aid the activation id
Returns: the object id
Parameters: desc the object description.
Returns: the remote stub for the activatable object (the first call on this stub will activate the object).
Throws: UnknownGroupException if the object group identifier is unknown ActivationException if the activation system is not running RemoteException if the remote call fails
Parameters: obj the object to unexport force if true, cancel all pending or running calls to that object (if false, the object with such calls is not unexported and false is returned by this method).
Returns: if the object was successfully unexported, false otherwise
Throws: NoSuchObjectException if such object is not known
Parameters: id the object id
Throws: UnknownObjectException if the id is unknown ActivationException if the activation system is not running RemoteException if the remote call fails.