public interface PlatformController
| Modifier and Type | Interface and Description |
|---|---|
static interface |
PlatformController.Listener
Inner callback interface to receive platform events.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPlatformListener(PlatformController.Listener aListener)
Add a platform listener.
|
AgentController |
createNewAgent(java.lang.String nickName,
java.lang.String className,
java.lang.Object[] args)
Create a new agent.
|
AgentController |
getAgent(java.lang.String localAgentName)
Get agent proxy to local agent given its name.
|
java.lang.String |
getName()
Get the name of the platform.
|
State |
getState()
Returns an instance of PlatformState.
|
void |
kill()
Kill the agent platform.
|
void |
removePlatformListener(PlatformController.Listener aListener)
Remove a platform listener.
|
void |
resume()
Activate the agent platform.
|
void |
start()
Start the platform after its been initialized.
|
void |
suspend()
Suspend the agent platform.
|
java.lang.String getName()
void start()
throws ControllerException
ControllerException - If any probelms other than illegal state occur.java.lang.IllegalStateException - If state is illegal for this activity.void suspend()
throws ControllerException
ControllerException - If any probelms other than illegal state occur.java.lang.IllegalStateException - If state is illegal for this activity.void resume()
throws ControllerException
ControllerException - If any probelms other than illegal state occur.java.lang.IllegalStateException - If state is illegal for this activity.void kill() throws ControllerException
ControllerException - If any probelms other than illegal state occur.java.lang.IllegalStateException - If state is illegal for this activity.AgentController getAgent(java.lang.String localAgentName) throws ControllerException
localAgentName - The short local name of the desired agent.ControllerException - If any probelms occur obtaining this proxy.AgentController createNewAgent(java.lang.String nickName, java.lang.String className, java.lang.Object[] args) throws ControllerException
nickName - The name of the agent.className - The class implementing the agent.args - The agents parameters - typically String[] from a configuration file.java.lang.IllegalStateException - If state is illegal for this activity.ControllerException - If any else goes wrong. All other exceptions are caught
and rethrown as a ControllerException.State getState()
void addPlatformListener(PlatformController.Listener aListener) throws ControllerException
aListener - The listener to be notified.ControllerExceptionvoid removePlatformListener(PlatformController.Listener aListener) throws ControllerException
aListener - The listener to be notified.ControllerException