|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cliftonsnyder.clutch.util.ClutchState
public class ClutchState
A helper class that maintains all of the local state and configuration information for Clutch. ClutchState also contains a main() method, and can be run on the command-line to provide useful information about the state of Clutch on a given machine.
Field Summary | |
---|---|
static int |
DEFAULT_AGENT_COUNT
the default number of agents that should be created |
static java.lang.String |
DEFAULT_AGENTNODE_NAME
the default name for the ProActive Node that will hold all of the Clutch Agents ("agentNode") |
static java.lang.String |
DEFAULT_DATANODE_NAME
|
static int |
DEFAULT_MAXPEERS
the default value for maxPeers (2) |
static int |
DEFAULT_PORT
the default RMI port to use (10001) |
Constructor Summary | |
---|---|
ClutchState(java.lang.String configFile)
constructor for the ClutchState object |
Method Summary | |
---|---|
void |
dump(java.io.PrintStream out)
|
int |
getAgentCount()
|
Node |
getAgentNode()
|
Node |
getDataNode()
|
int |
getMaxPeers()
|
java.lang.String |
getProperty(java.lang.String key)
a catchall for the properties in the configuration file for which an explicit getter does not exist |
Agent |
getRemoteAgent()
|
Agent |
getRemoteAgent(java.lang.String agentClassname)
|
Agent |
getRemoteAgentFromHost(java.lang.String hostname,
java.lang.String agentClassname)
retrieves a remote Agent from one of the bootstrap locations specified in the configuration file |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_AGENT_COUNT
public static final java.lang.String DEFAULT_AGENTNODE_NAME
public static final java.lang.String DEFAULT_DATANODE_NAME
public static final int DEFAULT_MAXPEERS
public static final int DEFAULT_PORT
Constructor Detail |
---|
public ClutchState(java.lang.String configFile)
configFile
- the location of the Clutch configuration fileMethod Detail |
---|
public void dump(java.io.PrintStream out)
public static void main(java.lang.String[] args)
args
- This main method optionally takes the location of a Clutch
configuration file as a parameter. If the parameter is not
supplied, the default location of '$PWD/etc/clutch.properties'
is used. If no configuration file exists at that location,
ClutchState will use default values to populate all of its
variables and retrieve Nodes and Agents. The output of running
this method on the command line should be a brief diagnostic
summary of the current local configuration and status of
Clutch.public int getAgentCount()
public Node getAgentNode()
public Node getDataNode()
public int getMaxPeers()
public java.lang.String getProperty(java.lang.String key)
key
- the name of the property
public Agent getRemoteAgentFromHost(java.lang.String hostname, java.lang.String agentClassname)
public Agent getRemoteAgent(java.lang.String agentClassname)
public Agent getRemoteAgent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |