java.rmi.activation
Class ActivationDesc

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.rmi.activation.ActivationDesc
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public final class ActivationDesc
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

An activation descriptor contains the information necessary to activate an object:

A descriptor registered with the activation system can be used to recreate/activate the object specified by the descriptor. The MarshalledObject in the object's descriptor is passed as the second argument to the remote object's constructor for object to use during reinitialization/activation.

Since:
1.2
See Also:
Activatable sample code for java.rmi.activation.Activatable definition code for java.rmi.activation.Activatable , Serialized Form

Constructor Summary
ActivationDesc sample code for java.rmi.activation.ActivationDesc.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject) definition code for java.rmi.activation.ActivationDesc.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject) (ActivationGroupID sample code for java.rmi.activation.ActivationGroupID definition code for java.rmi.activation.ActivationGroupID  groupID, String sample code for java.lang.String definition code for java.lang.String  className, String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data)
          Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc sample code for java.rmi.activation.ActivationDesc.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean) definition code for java.rmi.activation.ActivationDesc.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean) (ActivationGroupID sample code for java.rmi.activation.ActivationGroupID definition code for java.rmi.activation.ActivationGroupID  groupID, String sample code for java.lang.String definition code for java.lang.String  className, String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data, boolean restart)
          Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc sample code for java.rmi.activation.ActivationDesc.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject) definition code for java.rmi.activation.ActivationDesc.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject) (String sample code for java.lang.String definition code for java.lang.String  className, String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data)
          Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc sample code for java.rmi.activation.ActivationDesc.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean) definition code for java.rmi.activation.ActivationDesc.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean) (String sample code for java.lang.String definition code for java.lang.String  className, String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data, boolean restart)
          Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
 
Method Summary
 boolean equals sample code for java.rmi.activation.ActivationDesc.equals(java.lang.Object) definition code for java.rmi.activation.ActivationDesc.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares two activation descriptors for content equality.
 String sample code for java.lang.String definition code for java.lang.String getClassName sample code for java.rmi.activation.ActivationDesc.getClassName() definition code for java.rmi.activation.ActivationDesc.getClassName() ()
          Returns the class name for the object specified by this descriptor.
 MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject getData sample code for java.rmi.activation.ActivationDesc.getData() definition code for java.rmi.activation.ActivationDesc.getData() ()
          Returns a "marshalled object" containing intialization/activation data for the object specified by this descriptor.
 ActivationGroupID sample code for java.rmi.activation.ActivationGroupID definition code for java.rmi.activation.ActivationGroupID getGroupID sample code for java.rmi.activation.ActivationDesc.getGroupID() definition code for java.rmi.activation.ActivationDesc.getGroupID() ()
          Returns the group identifier for the object specified by this descriptor.
 String sample code for java.lang.String definition code for java.lang.String getLocation sample code for java.rmi.activation.ActivationDesc.getLocation() definition code for java.rmi.activation.ActivationDesc.getLocation() ()
          Returns the code location for the object specified by this descriptor.
 boolean getRestartMode sample code for java.rmi.activation.ActivationDesc.getRestartMode() definition code for java.rmi.activation.ActivationDesc.getRestartMode() ()
          Returns the "restart" mode of the object associated with this activation descriptor.
 int hashCode sample code for java.rmi.activation.ActivationDesc.hashCode() definition code for java.rmi.activation.ActivationDesc.hashCode() ()
          Return the same hashCode for similar ActivationDescs.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

ActivationDesc sample code for java.rmi.activation.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject) definition code for java.rmi.activation.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject)

public ActivationDesc(String sample code for java.lang.String definition code for java.lang.String  className,
                      String sample code for java.lang.String definition code for java.lang.String  location,
                      MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data)
               throws ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException 
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data. If this form of the constructor is used, the groupID defaults to the current id for ActivationGroup for this VM. All objects with the same ActivationGroupID are activated in the same VM.

Note that objects specified by a descriptor created with this constructor will only be activated on demand (by default, the restart mode is false). If an activatable object requires restart services, use one of the ActivationDesc constructors that takes a boolean parameter, restart.

This constructor will throw ActivationException if there is no current activation group for this VM. To create an ActivationGroup use the ActivationGroup.createGroup method.

Parameters:
className - the object's fully package qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
Throws:
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if the current group is nonexistent
Since:
1.2

ActivationDesc sample code for java.rmi.activation.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean) definition code for java.rmi.activation.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)

public ActivationDesc(String sample code for java.lang.String definition code for java.lang.String  className,
                      String sample code for java.lang.String definition code for java.lang.String  location,
                      MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data,
                      boolean restart)
               throws ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException 
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data. If this form of the constructor is used, the groupID defaults to the current id for ActivationGroup for this VM. All objects with the same ActivationGroupID are activated in the same VM.

This constructor will throw ActivationException if there is no current activation group for this VM. To create an ActivationGroup use the ActivationGroup.createGroup method.

Parameters:
className - the object's fully package qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Throws:
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if the current group is nonexistent
Since:
1.2

ActivationDesc sample code for java.rmi.activation.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject) definition code for java.rmi.activation.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject)

public ActivationDesc(ActivationGroupID sample code for java.rmi.activation.ActivationGroupID definition code for java.rmi.activation.ActivationGroupID  groupID,
                      String sample code for java.lang.String definition code for java.lang.String  className,
                      String sample code for java.lang.String definition code for java.lang.String  location,
                      MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data. All objects with the same groupID are activated in the same Java VM.

Note that objects specified by a descriptor created with this constructor will only be activated on demand (by default, the restart mode is false). If an activatable object requires restart services, use one of the ActivationDesc constructors that takes a boolean parameter, restart.

Parameters:
groupID - the group's identifier (obtained from registering ActivationSystem.registerGroup method). The group indicates the VM in which the object should be activated.
className - the object's fully package-qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if groupID is null
Since:
1.2

ActivationDesc sample code for java.rmi.activation.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean) definition code for java.rmi.activation.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)

public ActivationDesc(ActivationGroupID sample code for java.rmi.activation.ActivationGroupID definition code for java.rmi.activation.ActivationGroupID  groupID,
                      String sample code for java.lang.String definition code for java.lang.String  className,
                      String sample code for java.lang.String definition code for java.lang.String  location,
                      MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data,
                      boolean restart)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data. All objects with the same groupID are activated in the same Java VM.

Parameters:
groupID - the group's identifier (obtained from registering ActivationSystem.registerGroup method). The group indicates the VM in which the object should be activated.
className - the object's fully package-qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if groupID is null
Since:
1.2
Method Detail

getGroupID sample code for java.rmi.activation.ActivationDesc.getGroupID() definition code for java.rmi.activation.ActivationDesc.getGroupID()

public ActivationGroupID sample code for java.rmi.activation.ActivationGroupID definition code for java.rmi.activation.ActivationGroupID  getGroupID()
Returns the group identifier for the object specified by this descriptor. A group provides a way to aggregate objects into a single Java virtual machine. RMI creates/activates objects with the same groupID in the same virtual machine.

Returns:
the group identifier
Since:
1.2

getClassName sample code for java.rmi.activation.ActivationDesc.getClassName() definition code for java.rmi.activation.ActivationDesc.getClassName()

public String sample code for java.lang.String definition code for java.lang.String  getClassName()
Returns the class name for the object specified by this descriptor.

Returns:
the class name
Since:
1.2

getLocation sample code for java.rmi.activation.ActivationDesc.getLocation() definition code for java.rmi.activation.ActivationDesc.getLocation()

public String sample code for java.lang.String definition code for java.lang.String  getLocation()
Returns the code location for the object specified by this descriptor.

Returns:
the code location
Since:
1.2

getData sample code for java.rmi.activation.ActivationDesc.getData() definition code for java.rmi.activation.ActivationDesc.getData()

public MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  getData()
Returns a "marshalled object" containing intialization/activation data for the object specified by this descriptor.

Returns:
the object specific "initialization" data
Since:
1.2

getRestartMode sample code for java.rmi.activation.ActivationDesc.getRestartMode() definition code for java.rmi.activation.ActivationDesc.getRestartMode()

public boolean getRestartMode()
Returns the "restart" mode of the object associated with this activation descriptor.

Returns:
true if the activatable object associated with this activation descriptor is restarted via the activation daemon when either the daemon comes up or the object's group is restarted after an unexpected crash; otherwise it returns false, meaning that the object is only activated on demand via a method call. Note that if the restart mode is true, the activator does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Since:
1.2

equals sample code for java.rmi.activation.ActivationDesc.equals(java.lang.Object) definition code for java.rmi.activation.ActivationDesc.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares two activation descriptors for content equality.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for java.rmi.activation.ActivationDesc.hashCode() definition code for java.rmi.activation.ActivationDesc.hashCode()

public int hashCode()
Return the same hashCode for similar ActivationDescs.

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
an integer
See Also:
Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable