CONTENTS | PREV | NEXT Java Remote Method Invocation


7.4.5 The ActivationGroupDesc Class

An activation group descriptor (ActivationGroupDesc) contains the information necessary to create/recreate an activation group in which to activate objects in the same Java VM.

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:

package java.rmi.activation;
public final class ActivationGroupDesc
implements java.io.Serializable
{

public ActivationGroupDesc(java.util.Properties properties)
throws java.io.IOException;

public ActivationGroupDesc(String className,
java.security.CodeSource source,
java.rmi.MarshalledObject data);

public String getClassName();

public java.security.CodeSource getCodeSource();

public java.rmi.MarshalledObject getData();
}
The first constructor creates a group descriptor that uses the system default for group implementation and code source. The properties specify the properties set when the group executes. The additional properties java.rmi.activation.security.class and java.rmi.activation.security.codebase specify (respectively) the class name of the security manager, and the codebase, the location, of the security manager's class. If the former property is not set, then the java.rmi.RMISecurityManager will be used as the security manager for group. The method throws IOException if it cannot create a marshalled object containing the properties. If properties is null, then IllegalArgumentException is thrown.

The second constructor allows specification of an alternate group implementation denoted by: className, the group's fully package qualified class name; source, the CodeSource from where to load the group's class; and data the group's initialization data contained in marshalled form.

The getClassName method returns the group's class name.

The getCodeSource method returns the code source from where the group's class can be loaded.

The getData method returns the group's initialization data in marshalled form.



CONTENTS | PREV | NEXT
Copyright © 1997 Sun Microsystems, Inc. All Rights Reserved.