public interface ActivationSystem extends Remote
The ActivationSystem
provides a means for registering groups and "activatable" objects to be activated within those groups. The ActivationSystem
works closely with the Activator
, which activates objects registered via the ActivationSystem
, and the ActivationMonitor
, which obtains information about active and inactive objects, and inactive groups.
Activator
, ActivationMonitor
static final int SYSTEM_PORT
The port to lookup the activation system.
ActivationID registerObject(ActivationDesc desc) throws ActivationException, UnknownGroupException, RemoteException
The registerObject
method is used to register an activation descriptor, desc
, and obtain an activation identifier for a activatable remote object. The ActivationSystem
creates an ActivationID
(a activation identifier) for the object specified by the descriptor, desc
, and records, in stable storage, the activation descriptor and its associated identifier for later use. When the Activator
receives an activate
request for a specific identifier, it looks up the activation descriptor (registered previously) for the specified identifier and uses that information to activate the object.
desc
- the object's activation descriptorActivationException
- if registration fails (e.g., database update failure, etc).UnknownGroupException
- if group referred to in desc
is not registered with this systemRemoteException
- if remote call failsvoid unregisterObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException
Remove the activation id and associated descriptor previously registered with the ActivationSystem
; the object can no longer be activated via the object's activation id.
id
- the object's activation id (from previous registration)ActivationException
- if unregister fails (e.g., database update failure, etc).UnknownObjectException
- if object is unknown (not registered)RemoteException
- if remote call failsActivationGroupID registerGroup(ActivationGroupDesc desc) throws ActivationException, RemoteException
Register the activation group. An activation group must be registered with the ActivationSystem
before objects can be registered within that group.
desc
- the group's descriptorActivationException
- if group registration failsRemoteException
- if remote call failsActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws UnknownGroupException, ActivationException, RemoteException
Callback to inform activation system that group is now active. This call is made internally by the ActivationGroup.createGroup
method to inform the ActivationSystem
that the group is now active.
id
- the activation group's identifiergroup
- the group's instantiatorincarnation
- the group's incarnation numberUnknownGroupException
- if group is not registeredActivationException
- if a group for the specified id
is already active and that group is not equal to the specified group
or that group has a different incarnation
than the specified group
RemoteException
- if remote call failsvoid unregisterGroup(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException
Remove the activation group. An activation group makes this call back to inform the activator that the group should be removed (destroyed). If this call completes successfully, objects can no longer be registered or activated within the group. All information of the group and its associated objects is removed from the system.
id
- the activation group's identifierActivationException
- if unregister fails (e.g., database update failure, etc).UnknownGroupException
- if group is not registeredRemoteException
- if remote call failsvoid shutdown() throws RemoteException
Shutdown the activation system. Destroys all groups spawned by the activation daemon and exits the activation daemon.
RemoteException
- if failed to contact/shutdown the activation daemonActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc) throws ActivationException, UnknownObjectException, UnknownGroupException, RemoteException
Set the activation descriptor, desc
for the object with the activation identifier, id
. The change will take effect upon subsequent activation of the object.
id
- the activation identifier for the activatable objectdesc
- the activation descriptor for the activatable objectUnknownGroupException
- the group associated with desc
is not a registered groupUnknownObjectException
- the activation id
is not registeredActivationException
- for general failure (e.g., unable to update log)RemoteException
- if remote call failsgetActivationDesc(java.rmi.activation.ActivationID)
ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) throws ActivationException, UnknownGroupException, RemoteException
Set the activation group descriptor, desc
for the object with the activation group identifier, id
. The change will take effect upon subsequent activation of the group.
id
- the activation group identifier for the activation groupdesc
- the activation group descriptor for the activation groupUnknownGroupException
- the group associated with id
is not a registered groupActivationException
- for general failure (e.g., unable to update log)RemoteException
- if remote call failsgetActivationGroupDesc(java.rmi.activation.ActivationGroupID)
ActivationDesc getActivationDesc(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException
Returns the activation descriptor, for the object with the activation identifier, id
.
id
- the activation identifier for the activatable objectUnknownObjectException
- if id
is not registeredActivationException
- for general failureRemoteException
- if remote call failssetActivationDesc(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)
ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException
Returns the activation group descriptor, for the group with the activation group identifier, id
.
id
- the activation group identifier for the groupUnknownGroupException
- if id
is not registeredActivationException
- for general failureRemoteException
- if remote call failssetActivationGroupDesc(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc)
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.