org.cougaar.core.relay
Class PingReceiver

java.lang.Object
  extended by org.cougaar.util.GenericStateModelAdapter
      extended by org.cougaar.core.blackboard.BlackboardClientComponent
          extended by org.cougaar.core.plugin.ComponentPlugin
              extended by org.cougaar.core.relay.PingReceiver
All Implemented Interfaces:
BlackboardClient, org.cougaar.core.component.Component, PluginBase, org.cougaar.util.GenericStateModel

public class PingReceiver
extends ComponentPlugin

This plugin is an example ping target that receives relays and sends back a reply.

A "verbose=boolean" plugin parameter and System property is supported, exactly as documented in PingSender.

There must be one instance of this plugin in every agent that will receive PingSender relays. For simplicity, it's easiest to load a copy of this plugin into every agent.

See Also:
Remote plugin that sends the ping relays to this plugin, Optional browser-based GUI.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cougaar.core.blackboard.BlackboardClient
BlackboardClient.Local
 
Field Summary
 
Fields inherited from class org.cougaar.core.blackboard.BlackboardClientComponent
agentId, agentIdentificationService, alarmService, blackboard, blackboardClientName
 
Fields inherited from interface org.cougaar.core.plugin.PluginBase
INSERTION_POINT
 
Fields inherited from interface org.cougaar.util.GenericStateModel
ACTIVE, IDLE, LOADED, UNINITIALIZED, UNLOADED
 
Fields inherited from interface org.cougaar.core.blackboard.BlackboardClient
current
 
Constructor Summary
PingReceiver()
           
 
Method Summary
protected  void execute()
          This method is called whenever a subscription changes.
 void load()
          This method is called when the agent is created
protected  void setupSubscriptions()
          This method is called when the agent starts.
 
Methods inherited from class org.cougaar.core.plugin.ComponentPlugin
getConfigFinder
 
Methods inherited from class org.cougaar.core.blackboard.BlackboardClientComponent
currentTimeMillis, cycle, getAgentIdentifier, getAlarmService, getBindingSite, getBlackboardClientName, getBlackboardService, getMessageAddress, getParameter, getParameters, getServiceBroker, halt, precycle, requestCycle, resume, setAgentIdentificationService, setAlarmService, setBindingSite, setBlackboardService, setParameter, setSchedulerService, setServiceBroker, setSuicideService, shouldExecute, start, stop, suspend, toString, unload, wasAwakened
 
Methods inherited from class org.cougaar.util.GenericStateModelAdapter
getModelState, initialize, transitState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cougaar.util.GenericStateModel
getModelState, halt, initialize, resume, start, stop, suspend, unload
 

Constructor Detail

PingReceiver

public PingReceiver()
Method Detail

load

public void load()
This method is called when the agent is created

Specified by:
load in interface org.cougaar.util.GenericStateModel
Overrides:
load in class BlackboardClientComponent

setupSubscriptions

protected void setupSubscriptions()
This method is called when the agent starts.

Specified by:
setupSubscriptions in class ComponentPlugin

execute

protected void execute()
This method is called whenever a subscription changes.

Specified by:
execute in class ComponentPlugin