Rio Project 4.2 API Documentation



org.rioproject.opstring
Class GlobalAttrs

java.lang.Object
  extended by org.rioproject.opstring.GlobalAttrs
Direct Known Subclasses:
ParsedService

public class GlobalAttrs
extends Object

A GlobalAttrs represents the descriptive attributes of a service that has been parsed.

Author:
Dennis Reedy

Field Summary
protected  Map<String,String> artifacts
          List of ClassBundles
protected  Vector<AssociationDescriptor> associations
          Collection of service associations
protected  boolean autoAdvertise
          Flag to determine if the service should be automatically advertised when provisioned
protected  Map<String,ClassBundle> bundles
          List of ClassBundles
protected  List<String> cluster
          Collection of machines to provision to
protected  String codebase
          Codebase for the service
protected  List<String> configParms
          Configuration parameters
protected  List<String> groupList
          List of groups to join
protected  Properties initParms
          Initialization parameters
protected  List<String> locatorList
          List of locators to create
protected  List<LoggerConfig> logConfigs
          Array of LoggerConfig objects
protected  String organization
          The organization (representative owner) of the ServiceBean
protected  String[] provisionConfig
          Service Provision config
 
Constructor Summary
GlobalAttrs()
           
 
Method Summary
 void addAssociationDescriptor(AssociationDescriptor a)
          Add an AssociationDescriptor
 AssociationDescriptor[] getAssociationDescriptors()
          Get all AssociationDescriptors
 boolean getAutoAdvertise()
          Get auto advertise
 String[] getCluster()
          Set the target machine to provision the service to
 String getCodebase()
          Get the codebase property
 String[] getConfigParameters()
          Get Configuration parameters
 ClassBundle getFaultDetectionHandlerBundle()
          Get the ClassBundle for the FaultDetectionHandler
 String[] getGroups()
          Get the groups
 String[] getLocators()
          Get the locators as an array of String objects
 LoggerConfig[] getLogConfigs()
          Get the LoggerConfig objects
 String getOrganization()
          Get the organization
 Properties getParameters()
          Get initialization parameters
 String[] getRawConfigParameters()
           
 String[] getServiceProvisionConfig()
          Get the service provision config
 void setAutoAdvertise(String value)
          Set auto advertise
 void setCluster(String[] machines, boolean append)
          Set a target machine to provision the service to
 void setCodebase(String codebase)
          Set the codebase property
 void setConfigParameters(List<String> parms, boolean append)
          Add a Configuration parameter
 void setConfigParameters(String[] parms, boolean append)
          Add a Configuration parameter
 void setFaultDetectionHandlerBundle(ClassBundle bundle)
          Set the ClassBundle for the FaultDetectionHandler
 void setGroups(List<String> groups, boolean append)
          Add to the groups collection
 void setGroups(String[] groups, boolean append)
          Add to the groups collection
 void setLocators(String[] locators, boolean append)
          Add to the locators collection
 void setLogConfigs(LoggerConfig[] configs, boolean append)
          Set LoggerConfig objects
 void setOrganization(String organization)
          Set the organization value
 void setParameters(Properties params, boolean append)
          Set initialization parameters
 void setServiceProvisionConfig(String[] args)
          Set service provision config
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupList

protected List<String> groupList
List of groups to join


bundles

protected Map<String,ClassBundle> bundles
List of ClassBundles


artifacts

protected Map<String,String> artifacts
List of ClassBundles


locatorList

protected List<String> locatorList
List of locators to create


initParms

protected Properties initParms
Initialization parameters


configParms

protected List<String> configParms
Configuration parameters


cluster

protected List<String> cluster
Collection of machines to provision to


codebase

protected String codebase
Codebase for the service


organization

protected String organization
The organization (representative owner) of the ServiceBean


logConfigs

protected List<LoggerConfig> logConfigs
Array of LoggerConfig objects


provisionConfig

protected String[] provisionConfig
Service Provision config


associations

protected Vector<AssociationDescriptor> associations
Collection of service associations


autoAdvertise

protected boolean autoAdvertise
Flag to determine if the service should be automatically advertised when provisioned

Constructor Detail

GlobalAttrs

public GlobalAttrs()
Method Detail

setCluster

public void setCluster(String[] machines,
                       boolean append)
Set a target machine to provision the service to

Parameters:
machines - Array of machines to provision the ServiceBean to. Will be either the hostname or IP Address
append - If true, add to the current machine list, otherwise clear the current machine list and set the machine list to the input param

getCluster

public String[] getCluster()
Set the target machine to provision the service to

Returns:
An array of target machine hostnames or IP Addresses. This method will return a new array each time. If there are no Target Machines then a zero-length array will be returned

setCodebase

public void setCodebase(String codebase)
Set the codebase property

Parameters:
codebase - The codebase

getCodebase

public String getCodebase()
Get the codebase property

Returns:
The codebase property

setConfigParameters

public void setConfigParameters(String[] parms,
                                boolean append)
Add a Configuration parameter

Parameters:
parms - A String array of configuration parameters
append - If true, add to the current configuration, otherwise the configuration set to the input param

setConfigParameters

public void setConfigParameters(List<String> parms,
                                boolean append)
Add a Configuration parameter

Parameters:
parms - A String array of configuration parameters
append - If true, add to the current configuration, otherwise the configuration set to the input param

getRawConfigParameters

public String[] getRawConfigParameters()

getConfigParameters

public String[] getConfigParameters()
Get Configuration parameters

Returns:
String array suitable for use for a Configuration

setGroups

public void setGroups(String[] groups,
                      boolean append)
Add to the groups collection

Parameters:
groups - Array group names
append - If true, add to the current groups, otherwise clear the current groups and set the group list to the input param

setGroups

public void setGroups(List<String> groups,
                      boolean append)
Add to the groups collection

Parameters:
groups - Array group names
append - If true, add to the current groups, otherwise clear the current groups and set the group list to the input param

getGroups

public String[] getGroups()
Get the groups

Returns:
Array of group names

setLocators

public void setLocators(String[] locators,
                        boolean append)
Add to the locators collection

Parameters:
locators - Array of string representations of a known LookupLocator instance
append - If true, add to the current locators, otherwise clear the current locators and set the locators list to the input param

getLocators

public String[] getLocators()
Get the locators as an array of String objects

Returns:
Array of locator Strings

setLogConfigs

public void setLogConfigs(LoggerConfig[] configs,
                          boolean append)
Set LoggerConfig objects

Parameters:
configs - Array of LoggerConfig objects
append - Add to the Collection of LoggerConfigs or replace it

getLogConfigs

public LoggerConfig[] getLogConfigs()
Get the LoggerConfig objects

Returns:
Array of LoggerConfig objects

setOrganization

public void setOrganization(String organization)
Set the organization value

Parameters:
organization - The organization (representative owner) of the ServiceBean

getOrganization

public String getOrganization()
Get the organization

Returns:
The organization (representative owner) of the ServiceBean

setParameters

public void setParameters(Properties params,
                          boolean append)
Set initialization parameters

Parameters:
params - the input parameters to set
append - Whether to add the imput parametsr to the current Colection or to clear and set them to the inpt params

getParameters

public Properties getParameters()
Get initialization parameters

Returns:
A Properties object containing initialization name,value pairs

setServiceProvisionConfig

public void setServiceProvisionConfig(String[] args)
Set service provision config

Parameters:
args - Array of service provision configuration arguments

getServiceProvisionConfig

public String[] getServiceProvisionConfig()
Get the service provision config

Returns:
Array of service provision configuration arguments

setFaultDetectionHandlerBundle

public void setFaultDetectionHandlerBundle(ClassBundle bundle)
Set the ClassBundle for the FaultDetectionHandler

Parameters:
bundle - The ClassBundle for the FaultDetectionHandler

getFaultDetectionHandlerBundle

public ClassBundle getFaultDetectionHandlerBundle()
Get the ClassBundle for the FaultDetectionHandler

Returns:
The ClassBundle for the FaultDetectionHandler

addAssociationDescriptor

public void addAssociationDescriptor(AssociationDescriptor a)
                              throws Exception
Add an AssociationDescriptor

Parameters:
a - The AssociationDescriptor to add.
Throws:
Exception - If the AssociationDescriptor already exists (as defined by the equals method of an AssociationDescriptor), then an Exception is thrown

setAutoAdvertise

public void setAutoAdvertise(String value)
Set auto advertise

Parameters:
value - String value for autoAdvertise. If "yes" then true, otherwise false

getAutoAdvertise

public boolean getAutoAdvertise()
Get auto advertise

Returns:
autoAdvertise

getAssociationDescriptors

public AssociationDescriptor[] getAssociationDescriptors()
Get all AssociationDescriptors

Returns:
An array of AssociationDescriptor components. This method will return a new array each time. If there are no AssociationDescriptor components then a zero-length array will be returned

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.