fipaos.tutorial
Class PingAgent.IdleTask
fipaos.agent.task.Task
|
+--fipaos.tutorial.PingAgent.IdleTask
- public class PingAgent.IdleTask
- extends Task
- On creation, spawns a DFSearchTask instance with the
intent of locating other PingAgent instances on the local Agent platform.
Upon reciept of the DFSearchTask's results, the Agent's located are added
to the list of known (and "alive") PingAgent's within the PingAgent.
- The IdleTask periodically instantiates PingAllTask's, which is achieved by
using WaitTask's to notify it every 5 seconds.
- On reciept of an incoming "request" message, a PingResponseTask is instantiated.
Methods inherited from class fipaos.agent.task.Task |
doneDFSearchTask, errorDFSearchTask, getContext, getState, handleAcceptProposal, handleAgree, handleCfp, handleConfirm, handleDisconfirm, handleFailure, handleInform, handleInformIf, handleInformRef, handleLateMessage, handleNotUnderstood, handlePropagate, handlePropose, handleProxy, handleQueryIf, handleQueryRef, handleRefuse, handleRejectProposal, handleRequestWhen, handleRequestWhenever, handleSubscribe, handleUndeliverableMessage, notify, notifyMessageFailure, notifyMessageForEndedConversation, setContext, timeoutDFSearchTask |
PingAgent.IdleTask
public PingAgent.IdleTask()
DFSearchResults
public void DFSearchResults(DFAgentDescription[] descs)
- This method is invoked when a DFSearchTask has completed
succesfully.
donePingAgent_PingAllTask
public void donePingAgent_PingAllTask(Task t)
- This method is dynamically invoked when a PingAllTask
completes its task.
donePingAgent_PingResponseTask
public void donePingAgent_PingResponseTask(Task t)
- This method is dynamically invoked when a PingResponseTask
completes its task.
doneWaitTask
public void doneWaitTask(Task t)
- Invoked when a WaitTask "completes" (i.e. after the period
of time it has been asked to wait elapses).
handleRequest
public void handleRequest(Conversation conv)
- Invoked when a message is received with the "request" performative
and belongs to a conversation which isn't associated with any Task
(i.e. a new incoming "ping" conversation).