public class GatewayAgent extends Agent
JadeGateway enables two alternative ways to implement a gateway
that allows non-JADE code to communicate with JADE agents.
The first one is to extend the
The second one is to extend this
GatewayBehaviour and add an instance
of this Behaviour to your own agent that will have to function as a gateway (see its javadoc for reference).
|Constructor and Description|
|Modifier and Type||Method and Description|
subclasses may implement this method.
notify that the command has been processed and remove the command from the queue
This protected method is an empty placeholder for application specific startup code.
This protected method is an empty placeholder for application specific cleanup code.
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, createMessageQueue, doActivate, doClone, doDelete, doMove, doSuspend, doWait, doWait, doWake, getAgentState, getAID, getAID, getAMS, getArguments, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AInterface, getO2AObject, getProperty, getQueueSize, here, isRestarting, postMessage, putBack, putO2AObject, receive, receive, registerO2AInterface, removeBehaviour, restore, restoreBufferedState, send, setEnabledO2ACommunication, setO2AManager, setQueueSize, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void processCommand(java.lang.Object command)
The recommended pattern is the following implementation:
if (c instanceof Command1)
else if (c instanceof Command2)
public final void releaseCommand(java.lang.Object command)
command- is the same object that was passed in the processCommand method
protected void setup()
Behaviourobject to the agent, in order for it to be able to do anything.
protected void takeDown()