Package jade.tools.DummyAgent
Class DummyAgent
- java.lang.Object
-
- jade.core.Agent
-
- jade.tools.DummyAgent.DummyAgent
-
- All Implemented Interfaces:
TimerListener,Serializable,Serializable,Runnable
public class DummyAgent extends Agent
- Version:
- $Date$ $Revision$
- Author:
- Giovanni Caire - CSELT S.p.A
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jade.core.Agent
Agent.Interrupted
-
-
Field Summary
-
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN, MSG_QUEUE_CLASS
-
-
Constructor Summary
Constructors Constructor Description DummyAgent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterClone()Actions to perform after cloning.voidafterLoad()protected voidafterMove()Actions to perform after moving.voidafterReload()voidafterThaw()voidbeforeFreeze()protected voidbeforeMove()This empty placeholder shall be overridden by user defined agents to execute some actions before the original agent instance on the source container is stopped (e.g.voidbeforeReload()jade.tools.DummyAgent.DummyAgentGuigetGui()static voidmain(String[] args)protected voidsetup()This protected method is an empty placeholder for application specific startup code.protected voidtakeDown()This protected method is an empty placeholder for application specific cleanup code.-
Methods inherited from class jade.core.Agent
addBehaviour, beforeClone, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, createMessageQueue, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAID, getAMS, getArguments, getBehavioursCnt, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getExecutedBehavioursCnt, getGenerateBehaviourEvents, getGenerateMessageEvents, getHap, getHelper, getLocalName, getName, getO2AInterface, getO2AObject, getPostedMessagesCnt, getProperty, getQueueSize, getReceivedMessagesCnt, getSentMessagesCnt, getState, here, isAlive, isRestarting, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, receive, registerO2AInterface, removeBehaviour, removeTimer, restartLater, restoreBufferedState, restoreFields, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setGenerateMessageEvents, setO2AManager, setQueueSize, waitUntilStarted, write
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
setup
protected void setup()
Description copied from class:AgentThis protected method is an empty placeholder for application specific startup code. Agent developers can override it to provide necessary behaviour. When this method is called the agent has been already registered with the Agent Platform AMS and is able to send and receive messages. However, the agent execution model is still sequential and no behaviour scheduling is active yet. This method can be used for ordinary startup tasks such as DF registration, but is essential to add at least aBehaviourobject to the agent, in order for it to be able to do anything.- Overrides:
setupin classAgent- See Also:
Agent.addBehaviour(Behaviour b),Behaviour
-
takeDown
protected void takeDown()
Description copied from class:AgentThis protected method is an empty placeholder for application specific cleanup code. Agent developers can override it to provide necessary behaviour. When this method is called the agent has not deregistered itself with the Agent Platform AMS and is still able to exchange messages with other agents. However, no behaviour scheduling is active anymore and the Agent Platform Life Cycle state is already set to deleted. This method can be used for ordinary cleanup tasks such as DF deregistration, but explicit removal of all agent behaviours is not needed.
-
getGui
public jade.tools.DummyAgent.DummyAgentGui getGui()
-
beforeMove
protected void beforeMove()
Description copied from class:AgentThis empty placeholder shall be overridden by user defined agents to execute some actions before the original agent instance on the source container is stopped (e.g. releasing local resources such as a GUI).
IMPORTANT: At this point, it is ensured that the move process is successful and that a moved agent instance has been created on the destination container Therefore setting the value of a class field in this method will have no impact on the moved agent instance. Such parameters must indeed be set before thedoMove()method is called.
NOT available in MIDP- Overrides:
beforeMovein classAgent
-
afterMove
protected void afterMove()
Description copied from class:AgentActions to perform after moving. This empty placeholder method can be overridden by user defined agents to execute some actions just after arriving to the destination agent container for a migration.
NOT available in MIDP
-
afterClone
protected void afterClone()
Description copied from class:AgentActions to perform after cloning. This empty placeholder method can be overridden by user defined agents to execute some actions just after creating an agent copy to the destination agent container.
NOT available in MIDP- Overrides:
afterClonein classAgent
-
afterLoad
public void afterLoad()
-
beforeFreeze
public void beforeFreeze()
-
afterThaw
public void afterThaw()
-
beforeReload
public void beforeReload()
-
afterReload
public void afterReload()
-
-