|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--jade.wrapper.AgentContainer
This class is a Proxy class, allowing access to a JADE agent
container. Invoking methods on instances of this class, it is
possible to request services from createContainer() method in class
Runtime.
NOT available in MIDP
Runtime.createAgentContainer(Profile)| Nested Class Summary |
| Nested classes inherited from class jade.wrapper.PlatformController |
PlatformController.Listener |
| Constructor Summary | |
AgentContainer(jade.core.AgentContainerImpl impl,
java.lang.String platformName)
Public constructor. |
|
| Method Summary | |
Agent |
acceptNewAgent(java.lang.String nickname,
Agent anAgent)
Add an Agent to this container. |
void |
addPlatformListener(PlatformController.Listener aListener)
Add a platform listener. |
AgentController |
createNewAgent(java.lang.String nickname,
java.lang.String className,
java.lang.Object[] args)
Creates a new JADE agent, running within this container, |
AgentController |
getAgent(java.lang.String localAgentName)
Get agent proxy to local agent given its name. |
java.lang.String |
getContainerName()
Retrieve the name of the wrapped container. |
java.lang.String |
getName()
Deprecated. Use getPlatfromName instead. |
java.lang.String |
getPlatformName()
Retrieve the name of the wrapped platform. |
State |
getState()
Returns an instance of PlatformState. |
void |
installMTP(java.lang.String address,
java.lang.String className)
Installs a new message transport protocol, that will run within this container. |
void |
kill()
Shuts down this container, terminating all the agents running within it. |
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. |
void |
uninstallMTP(java.lang.String address)
Removes a message transport protocol, previously running within this container. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AgentContainer(jade.core.AgentContainerImpl impl,
java.lang.String platformName)
Runtime.createContainer() method.
impl - A concrete implementation of a JADE agent container.platformName - the name of the platformRuntime.createAgentContainer(Profile)| Method Detail |
public AgentController getAgent(java.lang.String localAgentName)
throws ControllerException
getAgent in interface PlatformControllerlocalAgentName - The short local name of the desired agent.
ControllerException - If any probelms occur obtaining this proxy.
public AgentController createNewAgent(java.lang.String nickname,
java.lang.String className,
java.lang.Object[] args)
throws StaleProxyException
createNewAgent in interface PlatformControllernickname - A platform-unique nickname for the newly created
agent. The agent will be given a FIPA compliant agent identifier
using the nickname and the ID of the platform it is running on.className - The fully qualified name of the class that
implements the agent.args - An object array, containing initialization parameters
to pass to the new agent.
StaleProxyException
public Agent acceptNewAgent(java.lang.String nickname,
Agent anAgent)
throws StaleProxyException
nickname - A platform-unique nickname for the newly created agent.
The agent will be given a FIPA compliant agent identifier using the nickname and
the ID of the platform it is running on.anAgent - The agent to be added to this agent container.
StaleProxyException
public void kill()
throws StaleProxyException
kill in interface PlatformControllerStaleProxyException
public void installMTP(java.lang.String address,
java.lang.String className)
throws jade.mtp.MTPException,
StaleProxyException
address - The transport address exported by the new MTP, in
string format.className - The fully qualified name of the Java class that
implements the transport protocol.
jade.mtp.MTPException - If something goes wrong during transport
protocol activation.
StaleProxyException
public void uninstallMTP(java.lang.String address)
throws jade.mtp.MTPException,
NotFoundException,
StaleProxyException
address - The transport address exported by the new MTP, in
string format.
jade.mtp.MTPException - If something goes wrong during transport
protocol activation.
NotFoundException - If no protocol with the given
address is currently installed on this container.
StaleProxyExceptionpublic java.lang.String getName()
getName in interface PlatformControllerpublic java.lang.String getPlatformName()
getContainerName()
public java.lang.String getContainerName()
throws ControllerException
ControllerExceptiongetPlatformName()
public void start()
throws ControllerException
PlatformController
start in interface PlatformControllerControllerException - If any probelms other than illegal state occur.
public void suspend()
throws ControllerException
PlatformController
suspend in interface PlatformControllerControllerException - If any probelms other than illegal state occur.
public void resume()
throws ControllerException
PlatformController
resume in interface PlatformControllerControllerException - If any probelms other than illegal state occur.public State getState()
PlatformController
getState in interface PlatformController
public void addPlatformListener(PlatformController.Listener aListener)
throws ControllerException
PlatformController
addPlatformListener in interface PlatformControlleraListener - The listener to be notified.
ControllerException
public void removePlatformListener(PlatformController.Listener aListener)
throws ControllerException
PlatformController
removePlatformListener in interface PlatformControlleraListener - The listener to be notified.
ControllerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||