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 class ActivationID
) contains several pieces of information needed for activating an object:
RemoteRef
instance), and 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:
Activatable.register
method Activatable
constructor (that takes three arguments and both registers and exports the object, and Activatable.exportObject
method that takes the activation descriptor, object and port as arguments; this method both registers and exports the object. Activatable
, Serialized Formpublic ActivationID(Activator activator)
The constructor for ActivationID
takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this identifier. An instance of ActivationID
is globally unique.
activator
- reference to the activator responsible for activating the objectUnsupportedOperationException
- if and only if activation is not supported by this implementationpublic Remote activate(boolean force) throws ActivationException, UnknownObjectException, RemoteException
Activate the object for this id.
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.ActivationException
- if activation failsUnknownObjectException
- if the object is unknownRemoteException
- if remote call failspublic int hashCode()
Returns a hashcode for the activation id. Two identifiers that refer to the same remote object will have the same hash code.
hashCode
in class Object
Hashtable
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.
equals
in class Object
obj
- the Object to compare withHashtable
© 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.