|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcsp.net.ServiceSettings
public class ServiceSettings
This class is used to hold settings that can be passed to
services when they are initialized. Two types of settings can
be held. The basic type of settings that can be held are
String
name,value pairs. Only one setting can exist per name.
The other type of settings that can be held are address settings. Each
address settings can hold a list of NodeAddressID
objects
against a String
name.
The class also has a field for storing the name of the Service. This can
be obtained by calling the getServiceName()
method.
Constructor Summary | |
---|---|
ServiceSettings(String name)
Constructor which takes the name of the serive for which this object holds settings. |
Method Summary | |
---|---|
void |
addAddress(String name,
NodeAddressID address)
Adds a named address setting. |
void |
addSetting(String name,
String value)
Adds a String name, value setting to this object. |
NodeAddressID[] |
getAddresses(String name)
Gets the addresses held in a setting of a specified name. |
String[] |
getAddressNames()
Returns an array of String objects containing the names of all
address settings held in this object. |
String |
getServiceName()
An accessor for obtaining the name of the service for which this object holds settings. |
String |
getSetting(String name)
Gets the String value held in named
String name, value pair setting. |
String[] |
getSettingNames()
Returns an array of String objects containing the names of all
String name, value settings held in this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceSettings(String name)
name
- the name of the service.Method Detail |
---|
public String getServiceName()
String
name of the service.public void addAddress(String name, NodeAddressID address)
name
- the name of the setting to add.address
- the address to add to the setting.public NodeAddressID[] getAddresses(String name)
name
- the name of the setting
NodeAddressID
objects held in the setting.public String[] getAddressNames()
String
objects containing the names of all
address settings held in this object.
String
array of all the address setting names.public String[] getSettingNames()
String
objects containing the names of all
String
name, value settings held in this object.
String
array of all the String
name, value setting names.public void addSetting(String name, String value)
String
name, value setting to this object.
name
- the name of the setting to add.value
- the value of the setting.public String getSetting(String name)
String
value held in named
String
name, value pair setting.
name
- the name of the setting of which to obtain the value.
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |