net.sf.adf.agent
Class Agent

java.lang.Object
  extended by 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.
 
Method Summary
 void addTask(Task t)
           
 AID getAID()
           
 java.io.Serializable getArguments()
           
 Logger getLogger()
           
 java.util.Queue<ACLMessage> getMessageQueue()
           
 void onActivate()
           
 void onPassivate()
           
 void onTerminate()
           
 void removeTask(Task t)
           
 void send(ACLMessage message)
           
 void setContainer(AgentContainer container)
          This method should only be called internally by the framework.
 void setReadyTask(Task t)
           
 void setResult(java.io.Serializable result)
           
 void setup()
          This method is called my the agent container immediatly after the agent is instantiated.
 void setWaitingTask(Task t)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Agent

public Agent()
This it the only relevant constructor for the agent. It is called using reflection so any other constructors are simply ignored.

Method Detail

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)