- All Implemented Interfaces:
Serializable
public final class ActivationDesc extends Object implements Serializable
- the object's group identifier,
- the object's fully-qualified class name,
- the object's code location (the location of the class), a codebase URL path,
- the object's restart "mode", and,
- a "marshalled" object that can contain object specific initialization data.
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, Serialized Form
-
Constructor Summary
Constructors Constructor Description ActivationDesc(String className, String location, MarshalledObject<?> data)Constructs an object descriptor for an object whose class name isclassName, that can be loaded from the codelocationand whose initialization information isdata.ActivationDesc(String className, String location, MarshalledObject<?> data, boolean restart)Constructs an object descriptor for an object whose class name isclassName, that can be loaded from the codelocationand whose initialization information isdata.ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject<?> data)Constructs an object descriptor for an object whose class name isclassNamethat can be loaded from the codelocationand whose initialization information isdata.ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject<?> data, boolean restart)Constructs an object descriptor for an object whose class name isclassNamethat can be loaded from the codelocationand whose initialization information isdata. -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Compares two activation descriptors for content equality.StringgetClassName()Returns the class name for the object specified by this descriptor.MarshalledObject<?>getData()Returns a "marshalled object" containing intialization/activation data for the object specified by this descriptor.ActivationGroupIDgetGroupID()Returns the group identifier for the object specified by this descriptor.StringgetLocation()Returns the code location for the object specified by this descriptor.booleangetRestartMode()Returns the "restart" mode of the object associated with this activation descriptor.inthashCode()Return the same hashCode for similarActivationDescs.
-
Constructor Details
-
ActivationDesc
public ActivationDesc(String className, String location, MarshalledObject<?> data) throws ActivationExceptionConstructs an object descriptor for an object whose class name isclassName, that can be loaded from the codelocationand whose initialization information isdata. If this form of the constructor is used, thegroupIDdefaults to the current id forActivationGroupfor this VM. All objects with the sameActivationGroupIDare 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 theActivationDescconstructors that takes a boolean parameter,restart.This constructor will throw
ActivationExceptionif there is no current activation group for this VM. To create anActivationGroupuse theActivationGroup.createGroupmethod.- Parameters:
className- the object's fully package qualified class namelocation- the object's code location (from where the class is loaded)data- the object's initialization (activation) data contained in marshalled form.- Throws:
ActivationException- if the current group is nonexistentUnsupportedOperationException- if and only if activation is not supported by this implementation- Since:
- 1.2
-
ActivationDesc
public ActivationDesc(String className, String location, MarshalledObject<?> data, boolean restart) throws ActivationExceptionConstructs an object descriptor for an object whose class name isclassName, that can be loaded from the codelocationand whose initialization information isdata. If this form of the constructor is used, thegroupIDdefaults to the current id forActivationGroupfor this VM. All objects with the sameActivationGroupIDare activated in the same VM.This constructor will throw
ActivationExceptionif there is no current activation group for this VM. To create anActivationGroupuse theActivationGroup.createGroupmethod.- Parameters:
className- the object's fully package qualified class namelocation- 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. Specifyingrestartto betruedoes not force an initial immediate activation of a newly registered object; initial activation is lazy.- Throws:
ActivationException- if the current group is nonexistentUnsupportedOperationException- if and only if activation is not supported by this implementation- Since:
- 1.2
-
ActivationDesc
public ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject<?> data)Constructs an object descriptor for an object whose class name isclassNamethat can be loaded from the codelocationand whose initialization information isdata. All objects with the samegroupIDare 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 theActivationDescconstructors that takes a boolean parameter,restart.- Parameters:
groupID- the group's identifier (obtained from registeringActivationSystem.registerGroupmethod). The group indicates the VM in which the object should be activated.className- the object's fully package-qualified class namelocation- the object's code location (from where the class is loaded)data- the object's initialization (activation) data contained in marshalled form.- Throws:
IllegalArgumentException- ifgroupIDis nullUnsupportedOperationException- if and only if activation is not supported by this implementation- Since:
- 1.2
-
ActivationDesc
public ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject<?> data, boolean restart)Constructs an object descriptor for an object whose class name isclassNamethat can be loaded from the codelocationand whose initialization information isdata. All objects with the samegroupIDare activated in the same Java VM.- Parameters:
groupID- the group's identifier (obtained from registeringActivationSystem.registerGroupmethod). The group indicates the VM in which the object should be activated.className- the object's fully package-qualified class namelocation- 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. Specifyingrestartto betruedoes not force an initial immediate activation of a newly registered object; initial activation is lazy.- Throws:
IllegalArgumentException- ifgroupIDis nullUnsupportedOperationException- if and only if activation is not supported by this implementation- Since:
- 1.2
-
-
Method Details
-
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 samegroupIDin the same virtual machine.- Returns:
- the group identifier
- Since:
- 1.2
-
getClassName
Returns the class name for the object specified by this descriptor.- Returns:
- the class name
- Since:
- 1.2
-
getLocation
Returns the code location for the object specified by this descriptor.- Returns:
- the code location
- Since:
- 1.2
-
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
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
Compares two activation descriptors for content equality. -
hashCode
public int hashCode()Return the same hashCode for similarActivationDescs.
-