CONTENTS | PREV | NEXT | Java Remote Method Invocation |
An ActivationDesc contains the information necessary to activate an object. It contains the object's activation group identifier, the class name for the object, a CodeSource from where the object's code can be loaded, and a MarshalledObject that may contain object specific initialization data used during each activation.A descriptor registered with the activation system is consulted (during the activation process) to obtain information in order to recreate/activate an object. The MarshalledObject in the object's descriptor is passed as the second argument to the remote object's constructor for the object to use during reinitialization/activation.
package java.rmi.activation;
public final class ActivationDesc implements java.io.Serializable
{
public ActivationDesc(String className,
java.security.CodeSource source,
java.rmi.MarshalledObject data)
throws ActivationException;
public ActivationDesc(ActivationGroupID groupID,
String className,
java.security.CodeSource source,
java.rmi.MarshalledObject data);
public ActivationGroupID getGroupID();public String getClassName();public java.security.CodeSource getCodeSource();public java.rmi.MarshalledObject getData();}The first constructor for ActivationDesc constructs an object descriptor for an object whose class is className, that can be loaded from the CodeSource, source, and whose initialization information, in marshalled form, is data. If this form of the constructor is used, the object's group identifier defaults to the current identifier for ActivationGroup for this VM. All objects with the same ActivationGroupID are activated in the same VM. If the current group is inactive or a default group cannot be created an ActivationException is thrown. If the groupID is null, an IllegalArgumentException is thrown.
Note - As a side-effect of creating an ActivationDesc, if an ActivationGroup for this VM is not currently active, a default one is created. The default activation group uses the java.rmi.RMISecurityManager as a security manager and upon reactivation will set the properties in the activated group's VM to be the current set of properties in the VM. If your application needs to use a different security manager, it must set the group for the VM before creating a default ActivationDesc. See the method ActivationGroup.createGroup for details on how to create an ActivationGroup for the VM.
The second constructor for ActivationDesc constructs an object descriptor for an object whose group identifier is groupID, whose class name is className that can be loaded from the CodeSource, source, and whose initialization information is data. All objects with the same groupID are activated in the same Java VM.The
getGroupID
method returns the group identifier for the object specified by the descriptor. A group provides a way to aggregate objects into a single Java virtual machine.The
getClassName
method returns the class name for the object specified by the activation descriptor.The
getCodeSource
method returns the code source from where the object's class can be downloaded.The
getData
method returns a "marshalled object" containing initialization/activation data for the object specified by the descriptor.