-
- All Superinterfaces:
- Remote
public interface Activator extends Remote
TheActivator
facilitates remote object activation. A "faulting" remote reference calls the activator'sactivate
method to obtain a "live" reference to a "activatable" remote object. Upon receiving a request for activation, the activator looks up the activation descriptor for the activation identifier,id
, determines the group in which the object should be activated initiates object re-creation via the group'sActivationInstantiator
(via a call to thenewInstance
method). The activator initiates the execution of activation groups as necessary. For example, if an activation group for a specific group identifier is not already executing, the activator initiates the execution of a VM for the group.The
Activator
works closely withActivationSystem
, which provides a means for registering groups and objects within those groups, andActivationMonitor
, which recives information about active and inactive objects and inactive groups.The activator is responsible for monitoring and detecting when activation groups fail so that it can remove stale remote references to groups and active object's within those groups.
- Since:
- 1.2
- See Also:
ActivationInstantiator
,ActivationGroupDesc
,ActivationGroupID
-
-
Method Summary
Methods Modifier and Type Method and Description MarshalledObject<? extends Remote>
activate(ActivationID id, boolean force)
Activate the object associated with the activation identifier,id
.
-
-
-
Method Detail
-
activate
MarshalledObject<? extends Remote> activate(ActivationID id, boolean force) throws ActivationException, UnknownObjectException, RemoteException
Activate the object associated with the activation identifier,id
. If the activator knows the object to be active already, andforce
is false , the stub with a "live" reference is returned immediately to the caller; otherwise, if the activator does not know that corresponding the remote object is active, the activator uses the activation descriptor information (previously registered) to determine the group (VM) in which the object should be activated. If anActivationInstantiator
corresponding to the object's group descriptor already exists, the activator invokes the activation group'snewInstance
method passing it the object's id and descriptor.If the activation group for the object's group descriptor does not yet exist, the activator starts an
ActivationInstantiator
executing (by spawning a child process, for example). When the activator receives the activation group's call back (via theActivationSystem
'sactiveGroup
method) specifying the activation group's reference, the activator can then invoke that activation instantiator'snewInstance
method to forward each pending activation request to the activation group and return the result (a marshalled remote object reference, a stub) to the caller.Note that the activator receives a "marshalled" object instead of a Remote object so that the activator does not need to load the code for that object, or participate in distributed garbage collection for that object. If the activator kept a strong reference to the remote object, the activator would then prevent the object from being garbage collected under the normal distributed garbage collection mechanism.
- Parameters:
id
- the activation identifier for the object being activatedforce
- if true, the activator contacts the group to obtain the remote object's reference; if false, returning the cached value is allowed.- Returns:
- the remote object (a stub) in a marshalled form
- Throws:
ActivationException
- if object activation failsUnknownObjectException
- if object is unknown (not registered)RemoteException
- if remote call fails- Since:
- 1.2
-
-
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
27/12/2024 13:23:58 Cette version de la page est en cache (à la date du 27/12/2024 13:23:58) 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/Activator.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.