All Packages Class Hierarchy This Package Previous Next Index
Class java.rmi.activation.ActivationDesc
java.lang.Object
|
+----java.rmi.activation.ActivationDesc
- public final class ActivationDesc
- extends Object
- implements Serializable
An activation descriptor contains the information necessary to
activate an object:
- the object's group identifier,
- the object's class name,
- the object's code source (the location of the class), 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:
- JDK1.2
ActivationDesc(ActivationGroupID, String, CodeSource, MarshalledObject)
- Constructs an object descriptor for an object whose class name
is
className
that can be loaded from the
CodeSource, source
, and whose initialization
information is data
.
ActivationDesc(String, CodeSource, MarshalledObject)
- Constructs an object descriptor for an object whose class name
is
className
, that can be loaded from the
CodeSource, source
, and whose initialization
information is data
.
getClassName()
- Returns the class name for the object specified by this
descriptor.
getCodeSource()
- Returns the code source for the object specified by
this descriptor.
getData()
- Returns a "marshalled object" containing intialization/activation
data for the object specified by this descriptor.
getGroupID()
- Returns the group identifier for the object specified by this
descriptor.
ActivationDesc
public ActivationDesc(String className,
CodeSource source,
MarshalledObject data) throws ActivationException
- Constructs an object descriptor for an object whose class name
is
className
, that can be loaded from the
CodeSource, source
, 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: 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. 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.
- Parameters:
- className - the object's fully package qualified class name
- source - the object's code source (from where the class is loaded)
- data - the object's initialization (activation) data contained
in marshalled form.
- Throws:
ActivationException
- if the current group is inactive
or a default group could not be created.
ActivationDesc
public ActivationDesc(ActivationGroupID groupID,
String className,
CodeSource source,
MarshalledObject data)
- Constructs an object descriptor for an object 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.
- 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
- source - the object's code source (from where the class is loaded)
- data - the object's initialization (activation) data contained
in marshalled form.
- Throws:
NullPointerException
- if
groupID
is null
getGroupID
public 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
getClassName
public String getClassName()
- Returns the class name for the object specified by this
descriptor.
- Returns:
- the class name
getCodeSource
public CodeSource getCodeSource()
- Returns the code source for the object specified by
this descriptor.
- Returns:
- the code source
getData
public MarshalledObject getData()
- Returns a "marshalled object" containing intialization/activation
data for the object specified by this descriptor.
- Returns:
- the object specific "initialization" data
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature