Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.core
Class ServiceBeanConfig

    java.lang.Object
      org.jini.rio.core.ServiceBeanConfig

All Implemented Interfaces:
  Serializable

    public class ServiceBeanConfig

extends Object
implements Serializable

This class defines configuration attributes for a ServiceBean instance. Some attributes may also be updated (groups, locators and initialization properties) and used for subsequent ServiceBean initializations

See Also:
  Serialized Form

Field Summary
`static String` | `ADAPTIVE_CODEBASE` Key for accessing adaptive codebase policy
`static String` | `COMMENT` ServiceBean Comment field
`static String` | `COMPONENT` ServiceBean component field, used to access Configuration entries
`static String` | `CONFIGURED_CODEBASE` Key for accessing the codebase property that was configured
`static String` | `GROUPS` Lookup Discovery groups
`static String` | `HOST_HISTORY` Key for accessing list of hosts the ServiceBean has previously visited (been allocated to).
`static String` | `INITIAL_PLANNED_SERVICES` Key for accessing the initial value for the number of planned services.
`static String` | `INSTANCE_ID` Key for accessing instanceID.
`static String` | `INSTANCE_ID_TOKEN` Token that will be replaced by the instanceID when either a parameter or configuration element is retrieved
`static String` | `JMX_NAME` Name to use when constructing the JMX ObjectName
`static String` | `LOCATORS` Lookup Locators
`static String` | `LOG_DIRECTORY` A Log Directory
`static String` | `LOGGER` Logger configurations
`static String` | `NAME` ServiceBean name field
`static String` | `OPSTRING` ServiceBean OperationalString name field
`static String` | `ORGANIZATION` ServiceBean organization field
`static String` | `SERVICE_PROVISION_CONFIG` Key for accessing service provisioning config
`static String` | `WATCHES` Key for accessing WatchDescriptors

Constructor Summary
`ServiceBeanConfig(Map<String,Object> configMap, String[] configArgs)` Create a new ServiceBeanConfig

Method Summary
`void` | `addInitParameter(String name, Object value)` Add a name/value pair to the Collection of ServiceBean controlled initialization parameters.
`String` | `getComment()` Informative comment for the ServiceBean
`String[]` | `getConfigArgs()` Get the ServiceBean configuration arguments
`Map<String,Object>` | `getConfigurationParamaters()` Get the system initialization parameters
`String[]` | `getGroups()` Returns an array consisting of the names of the groups whose members are the lookup services to discover.
`Map<String,Object>` | `getInitParameters()` Service controlled initialization parameters.
`Long` | `getInstanceID()` Get the instance ID.
`LookupLocator[]` | `getLocators()` Return Locator information the service optionally uses for discovery.
`String` | `getLogDir()` Name of a directory where a persistent service can save its state.
`String` | `getName()` Get the name for the ServiceBean
`String` | `getOperationalStringName()` Get the name of the OperationalString this object has been constructed with
`String` | `getOrganization()` Get the organization
`void` | `removeInitParameter(String name)` Remove a name/value pair from the Collection of ServiceBean controlled initialization parameters.
`void` | `setConfigArgs(String[] args)` Set the ServiceBean configuration arguments
`void` | `setConfigurationParamaters(Map<String,Object> configParms)` Set the system initialization parameters
`void` | `setGroups(String[] groups)` Set the Lookup groups the service will use for discovery.
`void` | `setLocators(LookupLocator[] lookupLocators)` Set Locator information the service optionally uses for discovery.
`void` | `setName(String name)` Set the name for the ServiceBean.
`void` | `setOperationalStringName(String name)` Set the name of the OperationalString
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### COMPONENT

    public static final String COMPONENT

  ServiceBean component field, used to access Configuration entries

  See Also:
    Constant Field Values

### NAME

    public static final String NAME

  ServiceBean name field

  See Also:
    Constant Field Values

### JMX_NAME

    public static final String JMX_NAME

  Name to use when constructing the JMX ObjectName

  See Also:
    Constant Field Values

### ORGANIZATION

    public static final String ORGANIZATION

  ServiceBean organization field

  See Also:
    Constant Field Values

### COMMENT

    public static final String COMMENT

  ServiceBean Comment field

  See Also:
    Constant Field Values

### OPSTRING

    public static final String OPSTRING

  ServiceBean OperationalString name field

  See Also:
    Constant Field Values

### GROUPS

    public static final String GROUPS

  Lookup Discovery groups

  See Also:
    Constant Field Values

### LOCATORS

    public static final String LOCATORS

  Lookup Locators

  See Also:
    Constant Field Values

### LOGGER

    public static final String LOGGER

  Logger configurations

  See Also:
    Constant Field Values

### LOG_DIRECTORY

    public static final String LOG_DIRECTORY

  A Log Directory

  See Also:
    Constant Field Values

### HOST_HISTORY

    public static final String HOST_HISTORY

  Key for accessing list of hosts the ServiceBean has previously visited (been allocated to). If this is the first instantiation of the service, an empty List has will be returned

  See Also:
    Constant Field Values

### INSTANCE_ID

    public static final String INSTANCE_ID

  Key for accessing instanceID. The instance ID represents an ordinal value relative to the number of services provisioned.

  See Also:
    Constant Field Values

### SERVICE_PROVISION_CONFIG

    public static final String SERVICE_PROVISION_CONFIG

  Key for accessing service provisioning config

  See Also:
    Constant Field Values

### ADAPTIVE_CODEBASE

    public static final String ADAPTIVE_CODEBASE

  Key for accessing adaptive codebase policy

  See Also:
    Constant Field Values

### CONFIGURED_CODEBASE

    public static final String CONFIGURED_CODEBASE

  Key for accessing the codebase property that was configured

  See Also:
    Constant Field Values

### INITIAL_PLANNED_SERVICES

    public static final String INITIAL_PLANNED_SERVICES

  Key for accessing the initial value for the number of planned services. This property is stored as an configuration parameter. The value for this property is an Integer

  See Also:
    Constant Field Values

### WATCHES

    public static final String WATCHES

  Key for accessing WatchDescriptors

  See Also:
    Constant Field Values

### INSTANCE_ID_TOKEN

    public static final String INSTANCE_ID_TOKEN

  Token that will be replaced by the instanceID when either a parameter or configuration element is retrieved

  See Also:
    Constant Field Values

Constructor Detail

### ServiceBeanConfig

    public ServiceBeanConfig(Map<String,Object> configMap,
                             String[] configArgs)

  Create a new ServiceBeanConfig

  Parameters:
    `configMap` - Configuration parmaters, composed of name,value pairs
    `configArgs` - String[] of attributes and values suitable for use with `Configuration`
  Throws:
    `NullPointerException` - if the configMap or configArgs parameters are null

Method Detail

### setName

    public void setName(String name)

  Set the name for the ServiceBean.

  Parameters:
    `name` - for the ServiceBean

### getName

    public String getName()

  Get the name for the ServiceBean

  Returns:
    Name for the ServiceBean

### getOperationalStringName

    public String getOperationalStringName()

  Get the name of the OperationalString this object has been constructed with

  Returns:
    Name of the OperationalString. If the name is null, an empty String is returned

### setOperationalStringName

    public void setOperationalStringName(String name)

  Set the name of the OperationalString

  Parameters:
    `name` - of the OperationalString.

### getComment

    public String getComment()

  Informative comment for the ServiceBean

  Returns:
    Comment for the ServiceBean, may be null

### getOrganization

    public String getOrganization()

  Get the organization

  Returns:
    The organization (representative owner) of the ServiceBean, may be null

### setGroups

    public void setGroups(String[] groups)

  Set the Lookup groups the service will use for discovery. If this parameter is not set (remains null), then no attempts will be made via group discovery to discover lookup services

  Parameters:
    `groups` - Array of String group names whose members are the lookup services to discover. Elements contained within the array may be modified as follows:
    - If the groups property is equivalent to the value of `DiscoveryGroupManagement.ALL_GROUPS`, the value will be transformed into "all"
    - If groups property is equivalent to an empty string "", then the value will be transformed to "public"

### getGroups

    public String[] getGroups()

  Returns an array consisting of the names of the groups whose members are the lookup services to discover.
  - If the groups property is null or has a zero length, then the returned value is `DiscoveryGroupManagement.NO_GROUPS`
  - If an element has the value of "all", that value will be transformed to `DiscoveryGroupManagement.ALL_GROUPS`
  - If an element has the value of "public", that value is transformed to an empty string ""

  Returns:
    String array of groups

### setLocators

    public void setLocators(LookupLocator[] lookupLocators)

  Set Locator information the service optionally uses for discovery.

  Parameters:
    `lookupLocators` - Array of LookupLocator instances

### getLocators

    public LookupLocator[] getLocators()

  Return Locator information the service optionally uses for discovery.

  Returns:
    Array of LookupLocator objects, or null

### addInitParameter

    public void addInitParameter(String name,
                                 Object value)

  Add a name/value pair to the Collection of ServiceBean controlled initialization parameters.

  Parameters:
    `name` - Object key name
    `value` - Object value
  Throws:
    `NullPointerException` - if the name parameter is null

### removeInitParameter

    public void removeInitParameter(String name)

  Remove a name/value pair from the Collection of ServiceBean controlled initialization parameters.

  Parameters:
    `name` - String key name
  Throws:
    `NullPointerException` - if the name parameter is null

### getInitParameters

    public Map<String,Object> getInitParameters()

  Service controlled initialization parameters.

  Returns:
    A Map of Service controlled initialization parameters.

### getConfigurationParamaters

    public Map<String,Object> getConfigurationParamaters()

  Get the system initialization parameters

  Returns:
    A Map of system initialization parameters. A new Map is allocated each time this method is invoked

### setConfigurationParamaters

    public void setConfigurationParamaters(Map<String,Object> configParms)

  Set the system initialization parameters

  Parameters:
    `configParms` - Map of system initialization parameters.

### getLogDir

    public String getLogDir()

  Name of a directory where a persistent service can save its state. This is a relative directory name whose root will be determined by the Cybernode

  Returns:
    The log directory name

### getInstanceID

    public Long getInstanceID()

  Get the instance ID. The instance ID represents an ordinal value relative to the number of services provisioned.

  Returns:
    The instance ID

### getConfigArgs

    public String[] getConfigArgs()

  Get the ServiceBean configuration arguments

  Returns:
    The ServiceBean configuration arguments. The returned String[] value is suitable for the creation of a `Configuration` object. If any part of the configuration contains the "$instanceID" token, and the instanceID proeprty has been assigned (is not zero), the value will be replaced by the instanceID value.

### setConfigArgs

    public void setConfigArgs(String[] args)

  Set the ServiceBean configuration arguments

  Parameters:
    `args` - ServiceBean configuration arguments for use as a `Configuration` object

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.