net.sf.adf.agent
Class Agent
java.lang.Object
net.sf.adf.agent.Agent
- All Implemented Interfaces:
- java.io.Serializable
public class Agent
- extends java.lang.Object
- implements java.io.Serializable
- Author:
- Catalin Hritcu
- See Also:
- Serialized Form
|
Constructor Summary |
Agent()
This it the only relevant constructor for the agent. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Agent
public Agent()
- This it the only relevant constructor for the agent.
It is called using reflection so any other
constructors are simply ignored.
addTask
public void addTask(Task t)
getAID
public AID getAID()
getArguments
public java.io.Serializable getArguments()
getLogger
public Logger getLogger()
getMessageQueue
public java.util.Queue<ACLMessage> getMessageQueue()
onActivate
public void onActivate()
onPassivate
public void onPassivate()
onTerminate
public void onTerminate()
removeTask
public void removeTask(Task t)
send
public void send(ACLMessage message)
setContainer
public final void setContainer(AgentContainer container)
- This method should only be called internally by the framework.
- Parameters:
container - The container of the agent.
setReadyTask
public void setReadyTask(Task t)
setResult
public void setResult(java.io.Serializable result)
setup
public void setup()
- This method is called my the agent container immediatly
after the agent is instantiated. The agent is still in
the Created state, so it cannot receive messages at this
time.
setWaitingTask
public void setWaitingTask(Task t)