|
|||||||||
| 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.ServiceAgent
com.cometway.om.AgentServer
public class AgentServer
A standard server interface to the agent kernel.
| Field Summary | |
|---|---|
protected java.lang.String |
agent_name_prefix
|
protected AgentKernelInterface |
agentKernel
|
protected Props |
agentList
|
protected IObjectManager |
om
|
| 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 | |
|---|---|
AgentServer()
|
|
| Method Summary | |
|---|---|
java.lang.String |
createAgent(ObjectID agentPropsID)
Creates an agent instance based on an Object Manager Props referenced by the specified ObjectID or String. |
boolean |
destroyAgent(java.lang.String agentName)
Calls the agent's destroy method, then destroys the agent instance. |
void |
initProps()
Override this method to initialize this agent's properties before it is started. |
void |
start()
Registers this instance with the service manager using the service_name property. |
boolean |
startAgent(java.lang.String agentName)
Starts the specified agent instance by calling agent's start method. |
void |
stop()
Unregisters this instance with the service manager using the service_name property. |
boolean |
stopAgent(java.lang.String agentName)
Signals the specified agent to stop by calling the agent's stop method. |
| Methods inherited from class com.cometway.ak.Agent |
|---|
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, println, register, registerService, setAgentController, setProps, toString, unregister, unregisterService, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected IObjectManager om
protected AgentKernelInterface agentKernel
protected Props agentList
protected java.lang.String agent_name_prefix
| Constructor Detail |
|---|
public AgentServer()
| Method Detail |
|---|
public void initProps()
Agent
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
ServiceAgent
start in interface AgentInterfacestart in class ServiceAgentpublic void stop()
ServiceAgent
stop in interface AgentInterfacestop in class ServiceAgentpublic java.lang.String createAgent(ObjectID agentPropsID)
createAgent in interface AgentServerInterfacepublic boolean destroyAgent(java.lang.String agentName)
destroyAgent in interface AgentServerInterfacepublic boolean startAgent(java.lang.String agentName)
startAgent in interface AgentServerInterfacepublic boolean stopAgent(java.lang.String agentName)
stopAgent in interface AgentServerInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||