- java.lang.Object
-
- java.rmi.activation.ActivationID
-
- All Implemented Interfaces:
- Serializable
public class ActivationID extends Object implements Serializable
Activation makes use of special identifiers to denote remote objects that can be activated over time. An activation identifier (an instance of the classActivationID
) contains several pieces of information needed for activating an object:- a remote reference to the object's activator (a
RemoteRef
instance), and - a unique identifier (a
UID
instance) for the object.
An activation identifier for an object can be obtained by registering an object with the activation system. Registration is accomplished in a few ways:
- via the
Activatable.register
method - via the first
Activatable
constructor (that takes three arguments and both registers and exports the object, and - via the first
Activatable.exportObject
method that takes the activation descriptor, object and port as arguments; this method both registers and exports the object.
- Since:
- 1.2
- See Also:
Activatable
, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ActivationID(Activator activator)
The constructor forActivationID
takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this identifier.
-
-
-
Constructor Detail
-
ActivationID
public ActivationID(Activator activator)
The constructor forActivationID
takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this identifier. An instance ofActivationID
is globally unique.- Parameters:
activator
- reference to the activator responsible for activating the object- Since:
- 1.2
-
-
Method Detail
-
activate
public Remote activate(boolean force) throws ActivationException, UnknownObjectException, RemoteException
Activate the object for this id.- Parameters:
force
- if true, forces the activator to contact the group when activating the object (instead of returning a cached reference); if false, returning a cached value is acceptable.- Returns:
- the reference to the active remote object
- Throws:
ActivationException
- if activation failsUnknownObjectException
- if the object is unknownRemoteException
- if remote call fails- Since:
- 1.2
-
hashCode
public int hashCode()
Returns a hashcode for the activation id. Two identifiers that refer to the same remote object will have the same hash code.
-
equals
public boolean equals(Object obj)
Compares two activation ids for content equality. Returns true if both of the following conditions are true: 1) the unique identifiers equivalent (by content), and 2) the activator specified in each identifier refers to the same remote object.
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-java/rmi/activation/ActivationID.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.