-
- All Superinterfaces:
- Remote
public interface ActivationSystem extends Remote
TheActivationSystem
provides a means for registering groups and "activatable" objects to be activated within those groups. TheActivationSystem
works closely with theActivator
, which activates objects registered via theActivationSystem
, and theActivationMonitor
, which obtains information about active and inactive objects, and inactive groups.- Since:
- 1.2
- See Also:
Activator
,ActivationMonitor
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SYSTEM_PORT
The port to lookup the activation system.
-
Method Summary
Methods Modifier and Type Method and Description ActivationMonitor
activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation)
Callback to inform activation system that group is now active.ActivationDesc
getActivationDesc(ActivationID id)
Returns the activation descriptor, for the object with the activation identifier,id
.ActivationGroupDesc
getActivationGroupDesc(ActivationGroupID id)
Returns the activation group descriptor, for the group with the activation group identifier,id
.ActivationGroupID
registerGroup(ActivationGroupDesc desc)
Register the activation group.ActivationID
registerObject(ActivationDesc desc)
TheregisterObject
method is used to register an activation descriptor,desc
, and obtain an activation identifier for a activatable remote object.ActivationDesc
setActivationDesc(ActivationID id, ActivationDesc desc)
Set the activation descriptor,desc
for the object with the activation identifier,id
.ActivationGroupDesc
setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc)
Set the activation group descriptor,desc
for the object with the activation group identifier,id
.void
shutdown()
Shutdown the activation system.void
unregisterGroup(ActivationGroupID id)
Remove the activation group.void
unregisterObject(ActivationID id)
Remove the activation id and associated descriptor previously registered with theActivationSystem
; the object can no longer be activated via the object's activation id.
-
-
-
Field Detail
-
SYSTEM_PORT
static final int SYSTEM_PORT
The port to lookup the activation system.- See Also:
- Constant Field Values
-
-
Method Detail
-
registerObject
ActivationID registerObject(ActivationDesc desc) throws ActivationException, UnknownGroupException, RemoteException
TheregisterObject
method is used to register an activation descriptor,desc
, and obtain an activation identifier for a activatable remote object. TheActivationSystem
creates anActivationID
(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 theActivator
receives anactivate
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.- Parameters:
desc
- the object's activation descriptor- Returns:
- the activation id that can be used to activate the object
- Throws:
ActivationException
- if registration fails (e.g., database update failure, etc).UnknownGroupException
- if group referred to indesc
is not registered with this systemRemoteException
- if remote call fails- Since:
- 1.2
-
unregisterObject
void unregisterObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException
Remove the activation id and associated descriptor previously registered with theActivationSystem
; the object can no longer be activated via the object's activation id.- Parameters:
id
- the object's activation id (from previous registration)- Throws:
ActivationException
- if unregister fails (e.g., database update failure, etc).UnknownObjectException
- if object is unknown (not registered)RemoteException
- if remote call fails- Since:
- 1.2
-
registerGroup
ActivationGroupID registerGroup(ActivationGroupDesc desc) throws ActivationException, RemoteException
Register the activation group. An activation group must be registered with theActivationSystem
before objects can be registered within that group.- Parameters:
desc
- the group's descriptor- Returns:
- an identifier for the group
- Throws:
ActivationException
- if group registration failsRemoteException
- if remote call fails- Since:
- 1.2
-
activeGroup
ActivationMonitor 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 theActivationGroup.createGroup
method to inform theActivationSystem
that the group is now active.- Parameters:
id
- the activation group's identifiergroup
- the group's instantiatorincarnation
- the group's incarnation number- Returns:
- monitor for activation group
- Throws:
UnknownGroupException
- if group is not registeredActivationException
- if a group for the specifiedid
is already active and that group is not equal to the specifiedgroup
or that group has a differentincarnation
than the specifiedgroup
RemoteException
- if remote call fails- Since:
- 1.2
-
unregisterGroup
void 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.- Parameters:
id
- the activation group's identifier- Throws:
ActivationException
- if unregister fails (e.g., database update failure, etc).UnknownGroupException
- if group is not registeredRemoteException
- if remote call fails- Since:
- 1.2
-
shutdown
void shutdown() throws RemoteException
Shutdown the activation system. Destroys all groups spawned by the activation daemon and exits the activation daemon.- Throws:
RemoteException
- if failed to contact/shutdown the activation daemon- Since:
- 1.2
-
setActivationDesc
ActivationDesc 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.- Parameters:
id
- the activation identifier for the activatable objectdesc
- the activation descriptor for the activatable object- Returns:
- the previous value of the activation descriptor
- Throws:
UnknownGroupException
- the group associated withdesc
is not a registered groupUnknownObjectException
- the activationid
is not registeredActivationException
- for general failure (e.g., unable to update log)RemoteException
- if remote call fails- Since:
- 1.2
- See Also:
getActivationDesc(java.rmi.activation.ActivationID)
-
setActivationGroupDesc
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.- Parameters:
id
- the activation group identifier for the activation groupdesc
- the activation group descriptor for the activation group- Returns:
- the previous value of the activation group descriptor
- Throws:
UnknownGroupException
- the group associated withid
is not a registered groupActivationException
- for general failure (e.g., unable to update log)RemoteException
- if remote call fails- Since:
- 1.2
- See Also:
getActivationGroupDesc(java.rmi.activation.ActivationGroupID)
-
getActivationDesc
ActivationDesc getActivationDesc(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException
Returns the activation descriptor, for the object with the activation identifier,id
.- Parameters:
id
- the activation identifier for the activatable object- Returns:
- the activation descriptor
- Throws:
UnknownObjectException
- ifid
is not registeredActivationException
- for general failureRemoteException
- if remote call fails- Since:
- 1.2
- See Also:
setActivationDesc(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)
-
getActivationGroupDesc
ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException
Returns the activation group descriptor, for the group with the activation group identifier,id
.- Parameters:
id
- the activation group identifier for the group- Returns:
- the activation group descriptor
- Throws:
UnknownGroupException
- ifid
is not registeredActivationException
- for general failureRemoteException
- if remote call fails- Since:
- 1.2
- See Also:
setActivationGroupDesc(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc)
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
05/11/2024 17:47:11 Cette version de la page est en cache (à la date du 05/11/2024 17:47:11) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 30/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/rmi/activation/ActivationSystem.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.