java.rmi.activation

Class ActivationID

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 class ActivationID) contains several pieces of information needed for activating an 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:

Since:
1.2
See Also:
Activatable, Serialized Form

Constructor Summary

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.

Method Summary

Remote
activate(boolean force)
Activate the object for this id.
boolean
equals(Object obj)
Compares two activation ids for content equality.
int
hashCode()
Returns a hashcode for the activation id.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ActivationID

public 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.
Parameters:
activator - reference to the activator responsible for activating the object
Since:
1.2
Usages and Demos :

View More Examples of ActivationID(Activator activator)
   1:       {
   2:         id = new ActivationID(this);
   3:         descriptions.put(id, desc);
   4:       }
   5:     

View Full Code Here

Method Details

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 fails
UnknownObjectException - if the object is unknown
RemoteException - if remote call fails
Since:
1.2
Usages and Demos :

View More Examples of activate(boolean force)
   1: import java.rmi.activation.ActivationException;
   2: import java.rmi.activation.ActivationID;
   3: 
   4:         ...
   5:     public static class ActivateClass {
   6:         public static Remote activate(ActivationID id)
   7:             throws ActivationException, RemoteException
   8:         ...
   9:         {
  10:             return id.activate(false);
  11:         }
  12:         ...
  13:                 "activate",
  14:                 new Class[] { ActivationID.class });

View Full Code Here
   1: import java.rmi.activation.ActivationException;
   2: import java.rmi.activation.ActivationID;
   3: 
   4:         ...
   5:     public static class ActivateClass {
   6:         public static Remote activate(ActivationID id)
   7:             throws ActivationException, RemoteException
   8:         ...
   9:         {
  10:             return id.activate(false);
  11:         }
  12:         ...
  13:                 "activate",
  14:                 new Class[] { ActivationID.class });

View Full Code Here

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.
Overrides:
equals in interface Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable

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.
Overrides:
hashCode in interface Object
Since:
1.2
See Also:
Hashtable