fipaos.tutorial
Class PingAgent

fipaos.agent.FIPAOSAgent
  |
  +--fipaos.tutorial.PingAgent

public class PingAgent
extends FIPAOSAgent

PingAgent provides demonstration of the upgraded TaskManager functionality. It encapsulates various states which interact with one another using the done() and newTask() methods.

The PingAgent initially registers the IdleTask as its listener task when it is created.


Inner Class Summary
 public classPingAgent.IdleTask
          On creation, spawns a DFSearchTask instance with the intent of locating other PingAgent instances on the local Agent platform.
 public classPingAgent.PingAllTask
          This Task takes care of the process of spawning individual PingTask instances.
 public classPingAgent.PingResponseTask
          This task simply responds to an incoming "ping request".
 public classPingAgent.PingTask
          This Task takes care of the process sending ping messages and waiting for a response to/from another PingAgent2

Inner classes inherited from class fipaos.agent.FIPAOSAgent
FIPAOSAgent.TopLevelHandlerTask

Fields inherited from class fipaos.agent.FIPAOSAgent
_registered_with, _state

Constructor Summary
PingAgent(String platform, String name, String ownership)
          Agent constructor - sets up an IdleTask as the default ListenerTask for incoming messages, and starts off registration with the AMS and DF

Method Summary
 voidactivate()
          This method is invoked when GUI should be shown - generally this is invoked by the AgentLoader when the Agent is in the List of running Agents - the default implementation in FIPAOSAgent does nothing.
 static voidmain(String[] args)
          Test-harness
 synchronized voidshutdown()
          Invoked when this Agent is about to be shutdown - this overrides the shutdown() method in the FIPAOSAgent class to enable the PingAgentGUI associated with this PingAgent to be removed

Methods inherited from class fipaos.agent.FIPAOSAgent
forward, forward, getAID, getCurrentConversation, getHAP, getLocalAMS, getLocalAMSAID, getLocalDF, getLocalDFAID, getNewConversation, getOwnership, getPlatformProfile, getProfile, getState, isShutdown, notify, notify, notifyDone, notifyError, notifyMessageInEndedConversation, notifyMessageUndeliverable, notifyTimeout, sendNotUnderstood, sendNotUnderstood, setMessageSender, waitForPushLock

Constructor Detail

PingAgent

public PingAgent(String platform, String name, String ownership)
Agent constructor - sets up an IdleTask as the default ListenerTask for incoming messages, and starts off registration with the AMS and DF
Method Detail

activate

public void activate()
This method is invoked when GUI should be shown - generally this is invoked by the AgentLoader when the Agent is in the List of running Agents - the default implementation in FIPAOSAgent does nothing.

main

public static void main(String[] args)
Test-harness

shutdown

public synchronized void shutdown()
Invoked when this Agent is about to be shutdown - this overrides the shutdown() method in the FIPAOSAgent class to enable the PingAgentGUI associated with this PingAgent to be removed

Association Links

to Class java.util.List

List of Agents that this PingAgent will attempt to "ping" (i.e. the ping-list)

to Class java.util.List

List of Agents that we beleive are active

to Class java.lang.String

Agent type

to Class fipaos.tutorial.PingAgentGUI

GUI for this PingAgent