- java.lang.Object
-
- java.rmi.activation.ActivationDesc
-
- All Implemented Interfaces:
- Serializable
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 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 and Description ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject<?> data)
Constructs an object descriptor for an object whose class name isclassName
that can be loaded from the codelocation
and 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 isclassName
that can be loaded from the codelocation
and whose initialization information isdata
.ActivationDesc(String className, String location, MarshalledObject<?> data)
Constructs an object descriptor for an object whose class name isclassName
, that can be loaded from the codelocation
and 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 codelocation
and whose initialization information isdata
.
-
Method Summary
Methods Modifier and Type Method and Description boolean
equals(Object obj)
Compares two activation descriptors for content equality.String
getClassName()
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.ActivationGroupID
getGroupID()
Returns the group identifier for the object specified by this descriptor.String
getLocation()
Returns the code location for the object specified by this descriptor.boolean
getRestartMode()
Returns the "restart" mode of the object associated with this activation descriptor.int
hashCode()
Return the same hashCode for similarActivationDesc
s.
-
-
-
Constructor Detail
-
ActivationDesc
public ActivationDesc(String className, String location, MarshalledObject<?> data) throws ActivationException
Constructs an object descriptor for an object whose class name isclassName
, that can be loaded from the codelocation
and whose initialization information isdata
. If this form of the constructor is used, thegroupID
defaults to the current id forActivationGroup
for this VM. All objects with the sameActivationGroupID
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 theActivationDesc
constructors that takes a boolean parameter,restart
.This constructor will throw
ActivationException
if there is no current activation group for this VM. To create anActivationGroup
use theActivationGroup.createGroup
method.- 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 nonexistent- Since:
- 1.2
-
ActivationDesc
public ActivationDesc(String className, String location, MarshalledObject<?> data, boolean restart) throws ActivationException
Constructs an object descriptor for an object whose class name isclassName
, that can be loaded from the codelocation
and whose initialization information isdata
. If this form of the constructor is used, thegroupID
defaults to the current id forActivationGroup
for this VM. All objects with the sameActivationGroupID
are activated in the same VM.This constructor will throw
ActivationException
if there is no current activation group for this VM. To create anActivationGroup
use theActivationGroup.createGroup
method.- 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. Specifyingrestart
to betrue
does not force an initial immediate activation of a newly registered object; initial activation is lazy.- Throws:
ActivationException
- if the current group is nonexistent- Since:
- 1.2
-
ActivationDesc
public ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject<?> data)
Constructs an object descriptor for an object whose class name isclassName
that can be loaded from the codelocation
and whose initialization information isdata
. All objects with the samegroupID
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 theActivationDesc
constructors that takes a boolean parameter,restart
.- Parameters:
groupID
- the group's identifier (obtained from registeringActivationSystem.registerGroup
method). 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
- ifgroupID
is null- 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 isclassName
that can be loaded from the codelocation
and whose initialization information isdata
. All objects with the samegroupID
are activated in the same Java VM.- Parameters:
groupID
- the group's identifier (obtained from registeringActivationSystem.registerGroup
method). 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. Specifyingrestart
to betrue
does not force an initial immediate activation of a newly registered object; initial activation is lazy.- Throws:
IllegalArgumentException
- ifgroupID
is null- Since:
- 1.2
-
-
Method Detail
-
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 samegroupID
in the same virtual machine.- Returns:
- the group identifier
- Since:
- 1.2
-
getClassName
public String getClassName()
Returns the class name for the object specified by this descriptor.- Returns:
- the class name
- Since:
- 1.2
-
getLocation
public String getLocation()
Returns the code location for the object specified by this descriptor.- Returns:
- the code location
- Since:
- 1.2
-
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
- 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
public boolean equals(Object obj)
Compares two activation descriptors for content equality.
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-java/rmi/activation/ActivationDesc.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.