FileDocCategorySizeDatePackage
ActivationGroupDesc.javaAPI DocJava SE 6 API10424Tue Jun 10 00:25:44 BST 2008java.rmi.activation

ActivationGroupDesc

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 name,
  • the group's code location (the location of the group's class), and
  • a "marshalled" object that can contain group specific initialization data.

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:

  • the group's ActivationGroupID, and
  • the group's initialization data (in a java.rmi.MarshalledObject)

version
1.31, 11/17/05
author
Ann Wollrath
since
1.2
see
ActivationGroup
see
ActivationGroupID

Fields Summary
private String
className
private String
location
private MarshalledObject
data
private CommandEnvironment
env
private Properties
props
private static final long
serialVersionUID
indicate compatibility with the Java 2 SDK v1.2 version of class
Constructors Summary
public ActivationGroupDesc(Properties overrides, 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.

param
overrides the set of properties to set when the group is recreated.
param
cmd the controlling options for executing the VM in another process (or null).
since
1.2


                                                                                                               
      
                                
    
	this(null, null, null, overrides, cmd);
    
public ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.

param
className the group's package qualified class name or null. A null group class name indicates the system's default ActivationGroup implementation.
param
location the location from where to load the group's class
param
data the group's initialization data contained in marshalled form (could contain properties, for example)
param
overrides a properties map which will override those set by default in the subprocess environment (will be translated into -D options), or null.
param
cmd the controlling options for executing the VM in another process (or null).
since
1.2

	this.props = overrides;
	this.env = cmd;
	this.data = data;
	this.location = location;
	this.className = className;
    
Methods Summary
public booleanequals(java.lang.Object obj)
Compares two activation group descriptors for content equality.

param
obj the Object to compare with
return
true if these Objects are equal; false otherwise.
see
java.util.Hashtable
since
1.2

	
	if (obj instanceof ActivationGroupDesc) {
	    ActivationGroupDesc desc = (ActivationGroupDesc) obj;
	    return
		((className == null ? desc.className == null :
		  className.equals(desc.className)) &&
		 (location == null ? desc.location == null :
		  location.equals(desc.location)) &&
		 (data == null ? desc.data == null : data.equals(desc.data)) &&
		 (env == null ? desc.env == null : env.equals(desc.env)) &&
		 (props == null ? desc.props == null :
		  props.equals(desc.props)));
	} else {
	    return false;
	}
    
public java.lang.StringgetClassName()
Returns the group's class name (possibly null). A null group class name indicates the system's default ActivationGroup implementation.

return
the group's class name
since
1.2

	return className;
    
public java.rmi.activation.ActivationGroupDesc$CommandEnvironmentgetCommandEnvironment()
Returns the group's command-environment control object.

return
the command-environment object, or null
since
1.2

	return this.env;
    
public java.rmi.MarshalledObjectgetData()
Returns the group's initialization data.

return
the group's initialization data
since
1.2

	return data;
    
public java.lang.StringgetLocation()
Returns the group's code location.

return
the group's code location
since
1.2

	return location;
    
public java.util.PropertiesgetPropertyOverrides()
Returns the group's property-override list.

return
the property-override list, or null
since
1.2

	return (props != null) ? (Properties) props.clone() : null;
    
public inthashCode()
Produce identical numbers for similar ActivationGroupDescs.

return
an integer
see
java.util.Hashtable

	// hash location, className, data, and env
	// but omit props (may be expensive)
	return ((location == null
		    ? 0
		    : location.hashCode() << 24) ^
		(env == null
		    ? 0
		    : env.hashCode() << 16) ^
		(className == null
		    ? 0
		    : className.hashCode() << 8) ^
		(data == null
		    ? 0
		    : data.hashCode()));