GigaSpaces XAP 9.7.2 API

com.sun.jini.start
Class SharedActivationGroupDescriptor

java.lang.Object
  extended by com.sun.jini.start.SharedActivationGroupDescriptor
All Implemented Interfaces:
ServiceDescriptor, Serializable

public class SharedActivationGroupDescriptor
extends Object
implements ServiceDescriptor, Serializable

Class used to create a shared activation group. Clients construct this object with the details of the activation group to be launched, then call create to register the activation system group with the activation system

This class, in conjunction with the ActivateWrapper class, creates an activation group suitable for hosting multiple service objects, with each object maintaining a distinct codebase and policy.

Since:
2.0
Author:
Sun Microsystems, Inc.
See Also:
Serialized Form

Constructor Summary
SharedActivationGroupDescriptor(String policy, String classpath, String log, String serverCommand, String[] serverOptions, String[] serverProperties)
          Trivial constructor.
SharedActivationGroupDescriptor(String policy, String classpath, String log, String serverCommand, String[] serverOptions, String[] serverProperties, String host, int port)
          Trivial constructor.
 
Method Summary
 Object create(Configuration config)
          Method that attempts to create a shared activation system group from the description information provided via constructor parameters.
 String getActivationSystemHost()
          Activation system host accessor method.
 int getActivationSystemPort()
          Activation system port accessor method.
 String getClasspath()
          Classpath accessor method.
 String getLog()
          Shared group log accessor method.
 String getPolicy()
          Policy accessor method.
 String getServerCommand()
          Command accessor method.
 String[] getServerOptions()
          Command options accessor method.
 Properties getServerProperties()
          Properties accessor method.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedActivationGroupDescriptor

public SharedActivationGroupDescriptor(String policy,
                                       String classpath,
                                       String log,
                                       String serverCommand,
                                       String[] serverOptions,
                                       String[] serverProperties)
Trivial constructor. Simply calls the other overloaded constructor with the host and port parameters set to null and 0, respectively.


SharedActivationGroupDescriptor

public SharedActivationGroupDescriptor(String policy,
                                       String classpath,
                                       String log,
                                       String serverCommand,
                                       String[] serverOptions,
                                       String[] serverProperties,
                                       String host,
                                       int port)
Trivial constructor. Simply assigns given parameters to their associated, internal fields.

Parameters:
policy - location of VM policy filename or URL
classpath - location where shared VM classes can be found. Classpath components must be separated by path separators.
log - location where group identifier information will be persisted
serverCommand - VM command to use
serverOptions - array of command line options to pass on the VM's command line
serverProperties - array of property/value string pairs to pass on the VMs command line (as in -D<property>=value). This array must have an even number of elements.
host - hostname of desired activation system. If null, defaults to the localhost.
port - port of desired activation system. If value is <= 0, then defaults to ActivationSystem.SYSTEM_PORT.
Method Detail

getPolicy

public final String getPolicy()
Policy accessor method.

Returns:
the policy location associated with this service descriptor.

getClasspath

public final String getClasspath()
Classpath accessor method.

Returns:
classpath associated with this service descriptor.

getLog

public final String getLog()
Shared group log accessor method.

Returns:
the shared group log associated with this service descriptor.

getServerCommand

public final String getServerCommand()
Command accessor method.

Returns:
the path-qualified java command name associated with this service descriptor.

getServerOptions

public final String[] getServerOptions()
Command options accessor method.

Returns:
the command options associated with this service descriptor.

getServerProperties

public final Properties getServerProperties()
Properties accessor method.

Returns:
the VM properties associated with this service descriptor.

getActivationSystemHost

public final String getActivationSystemHost()
Activation system host accessor method.

Returns:
the activation system host associated with this service descriptor.

getActivationSystemPort

public final int getActivationSystemPort()
Activation system port accessor method.

Returns:
the activation system port associated with this service descriptor.

create

public Object create(Configuration config)
              throws Exception
Method that attempts to create a shared activation system group from the description information provided via constructor parameters.

This method:

Notes:
  1. Prepends invoking VM's classpath to the server command options. This allows subsequent classpath settings to override.
  2. Adds a "java.security.policy" property with the provided policy setting to server properties.

Specified by:
create in interface ServiceDescriptor
Parameters:
config - The Configuration object used to configure the creation of the returned object.
Returns:
the ActivationGroupID for the newly created activation system group instance.
Throws:
Exception - Thrown if there was any problem creating the object.

toString

public String toString()
Overrides:
toString in class Object

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.