java.rmi.activation

Class ActivationGroupDesc

Implemented Interfaces:
Serializable

public final class ActivationGroupDesc
extends Object
implements Serializable

An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects. Such a descriptor contains:

The group's class must be a concrete subclass of ActivationGroup. A subclass of ActivationGroup is created/recreated via the ActivationGroup.createGroup static method that invokes a special constructor that takes two arguments:

Since:
1.2
See Also:
ActivationGroup, ActivationGroupID, Serialized Form

Nested Class Summary

static class
ActivationGroupDesc.CommandEnvironment
Startup options for ActivationGroup implementations.

Constructor Summary

ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.
ActivationGroupDesc(Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Constructs a group descriptor that uses the system defaults for group implementation and code location.

Method Summary

boolean
equals(Object obj)
Compares two activation group descriptors for content equality.
String
getClassName()
Returns the group's class name (possibly null).
ActivationGroupDesc.CommandEnvironment
getCommandEnvironment()
Returns the group's command-environment control object.
MarshalledObject
getData()
Returns the group's initialization data.
String
getLocation()
Returns the group's code location.
Properties
getPropertyOverrides()
Returns the group's property-override list.
int
hashCode()
Produce identical numbers for similar ActivationGroupDescs.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ActivationGroupDesc

public ActivationGroupDesc(String className,
                           String location,
                           MarshalledObject data,
                           Properties overrides,
                           ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.
Parameters:
className - the group's package qualified class name or null. A null group class name indicates the system's default ActivationGroup implementation.
location - the location from where to load the group's class
data - the group's initialization data contained in marshalled form (could contain properties, for example)
overrides - a properties map which will override those set by default in the subprocess environment (will be translated into -D options), or null.
cmd - the controlling options for executing the VM in another process (or null).
Since:
1.2

ActivationGroupDesc

public ActivationGroupDesc(Properties overrides,
                           ActivationGroupDesc.CommandEnvironment cmd)
Constructs a group descriptor that uses the system defaults for group implementation and code location. Properties specify Java environment overrides (which will override system properties in the group implementation's VM). The command environment can control the exact command/options used in starting the child VM, or can be null to accept rmid's default.

This constructor will create an ActivationGroupDesc with a null group class name, which indicates the system's default ActivationGroup implementation.

Parameters:
overrides - the set of properties to set when the group is recreated.
cmd - the controlling options for executing the VM in another process (or null).
Since:
1.2
Usages and Demos :

View More Examples of ActivationGroupDesc(Properties overrides,CommandEnvironment cmd)
   1:        prop.put("java.security.policy",SimpleClient.class.getResource("server.policy").toString());
   2:        ActivationGroupDesc group=new ActivationGroupDesc(prop,null);
   3:        ActivationGroupID id=ActivationGroup.getSystem().registerGroup(group);
   4:   
   5:        String classURL=System.getProperty("java.rmi.server.codebase");

View Full Code Here
   1:          props.put("java.security.policy", new File("server.policy").getCanonicalPath());
   2:          ActivationGroupDesc group = new ActivationGroupDesc(props, null);
   3:          ActivationGroupID id = ActivationGroup.getSystem().registerGroup(group);
   4:          MarshalledObject p1param = new MarshalledObject("Blackwell Toaster");
   5:          MarshalledObject p2param = new MarshalledObject("ZapXpress Microwave Oven");

View Full Code Here
   1:       ActivationGroupDesc.CommandEnvironment ace = null; 
   2:       ActivationGroupDesc agd = new ActivationGroupDesc(props, ace);
   3:       ActivationGroupID agi   = ActivationGroup.getSystem().registerGroup(agd);
   4: 
   5:       String location       = "file:/home/lefevre/soft/JVS/src/";

View Full Code Here

Method Details

equals

public boolean equals(Object obj)
Compares two activation group descriptors for content equality.
Overrides:
equals in interface Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable

getClassName

public String getClassName()
Returns the group's class name (possibly null). A null group class name indicates the system's default ActivationGroup implementation.
Returns:
the group's class name
Since:
1.2

getCommandEnvironment

public ActivationGroupDesc.CommandEnvironment getCommandEnvironment()
Returns the group's command-environment control object.
Returns:
the command-environment object, or null
Since:
1.2

getData

public MarshalledObject getData()
Returns the group's initialization data.
Returns:
the group's initialization data
Since:
1.2

getLocation

public String getLocation()
Returns the group's code location.
Returns:
the group's code location
Since:
1.2

getPropertyOverrides

public Properties getPropertyOverrides()
Returns the group's property-override list.
Returns:
the property-override list, or null
Since:
1.2

hashCode

public int hashCode()
Produce identical numbers for similar ActivationGroupDescs.
Overrides:
hashCode in interface Object
Returns:
an integer
See Also:
Hashtable