|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.faban.harness.services.ServiceContext
public class ServiceContext
This class provides the context for every service. Each service has only one context.
Field Summary | |
---|---|
ServiceDescription |
desc
The service description describing this context. |
Method Summary | |
---|---|
Object |
getAttribute(String key)
Obtains the attribute of a given key. |
List<NameValuePair<Integer>> |
getHostPorts()
Obtains a list of host:ports as configured in the configuration file to be used by the role this service is associated. |
String |
getHostRole()
Obtains host role. |
String[] |
getHosts()
Obtains the list of hosts as configured in the configuration file for the role this service is associated. |
String |
getName()
Obtains the name (aka id) of the service. |
String |
getProperty(String key)
Obtains the property for a given key. |
String |
getRunDuration()
Obtains the run duration. |
List<NameValuePair<Integer>> |
getUniqueHostPorts()
Obtains a list of hostports non-duplicate hosts:ports. |
String[] |
getUniqueHosts()
Obtains a list of non-duplicate hosts. |
boolean |
isRestart()
Check if service restart is enabled |
void |
setAttribute(String key,
Object value)
Sets an object attribute in the service context. |
void |
setProperty(String key,
String value)
Sets a property in the service context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ServiceDescription desc
Method Detail |
---|
public String getName()
public String[] getHosts()
public String[] getUniqueHosts()
public List<NameValuePair<Integer>> getHostPorts()
public List<NameValuePair<Integer>> getUniqueHostPorts()
public boolean isRestart()
true
if restart is enabledpublic String getHostRole()
public String getProperty(String key)
key
- The property key
public void setProperty(String key, String value)
key
- The property keyvalue
- The property valuepublic Object getAttribute(String key)
key
- They attribute key
public void setAttribute(String key, Object value)
key
- The attribute keyvalue
- The attributepublic String getRunDuration()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |