|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.Props
com.cometway.ak.Agent
com.cometway.ak.StartupAgent
public class StartupAgent
This is the default Startup Agent for the Comet Way Agent Kernel. On startup, it scans the startup_dir for files ending in .startup, alphabetizes these filenames, and proceeds by loading a Props file for each, which it passes to the Agent Kernel to create and start an agent based on each set of Props.
| Field Summary |
|---|
| Fields inherited from class com.cometway.ak.Agent |
|---|
agent_id, agentController, CREATING_STATE, debugReporter, DESTROYED_STATE, DESTROYING_STATE, errorReporter, FAILED_STATE, printlnReporter, props, RUNNING_STATE, STARTING_STATE, STOPPED_STATE, STOPPING_STATE, warningReporter |
| Constructor Summary | |
|---|---|
StartupAgent()
|
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File dir,
java.lang.String name)
Returns true if the passed file ends in .startup |
protected java.util.Vector |
getAgentList()
Returns a List containing Props of agents to instantiate and start. |
void |
initProps()
Initializes the Props for this agent. |
void |
start()
Initiates the startup process by loading agents in the startup directory. |
protected void |
startAgents(java.util.Vector agentList)
Instantiates and starts agents using the specified List of Props containing agent parameters. |
| Methods inherited from class com.cometway.ak.Agent |
|---|
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, println, register, registerService, setAgentController, setProps, stop, toString, unregister, unregisterService, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StartupAgent()
| Method Detail |
|---|
public boolean accept(java.io.File dir,
java.lang.String name)
accept in interface java.io.FilenameFilterpublic void initProps()
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
start in interface AgentInterfacestart in class Agentprotected java.util.Vector getAgentList()
protected void startAgents(java.util.Vector agentList)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||