org.cougaar.demo.mesh
Class MeshPlugin

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.demo.mesh.MeshPlugin
All Implemented Interfaces:
org.cougaar.core.blackboard.BlackboardClient, org.cougaar.core.component.Component, org.cougaar.core.plugin.PluginBase, org.cougaar.util.GenericStateModel

public class MeshPlugin
extends org.cougaar.core.plugin.ComponentPlugin

This plugin is a relay scalability test that creates an arbitrarily large "mesh" of relays.

For example, this plugin can be configured to create a fully-connected "star" network formation:

   agent "Peer0" sends to "Peer1" and "Peer2"
   agent "Peer1" sends to "Peer0" and "Peer2"
   agent "Peer2" sends to "Peer0" and "Peer1"
 

Other topologies can be created, e.g. chains, rings, trees, etc. The only requirement is that, if agent "A" lists agent "B" as a target, then "B" must also list "A" as a target.

Each relay iteration waits until the prior iteration has completed, making it easy to identify bottlenecks and dropped/duplicate relays. Each agent logs
  Completed all N iterations
once all maxIterations have succeeded.

Plugin parameters:

targets=
Required comma-separated targets list, which supports range expressions for easy scalability testing. For example, "Peer[0..3]" is expanded to:
     Peer0, Peer1, Peer2
Note that this agent must be listed as one of the targets, otherwise it will not send any relays. This "self" requirement makes it easy to enable/disable many agents using a global-replace in the configuration file.
verbose=true
Enable verbose SHOUT logging.
bloatSize=-1
Number of extra bytes to bloat each message, or -1 for no added size.
maxIterations=-1
Maximum number of relay iterations, or -1 for no limit.
delayMillis=5000
Added delay between iterations, in milliseconds, or -1 for for no extra delay.
timeoutMillis=5000
How long to wait into an iteration before logging a warning that the iteration is taking a long time, or -1 for no warnings.
exitWhenDone=false
Call System.exit(int) when all maxIterations have been completed.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cougaar.core.blackboard.BlackboardClient
org.cougaar.core.blackboard.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
MeshPlugin()
           
 
Method Summary
protected  void execute()
          This method is called whenever a subscription changes or alarm fires.
 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

MeshPlugin

public MeshPlugin()
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 org.cougaar.core.blackboard.BlackboardClientComponent

setupSubscriptions

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

Specified by:
setupSubscriptions in class org.cougaar.core.plugin.ComponentPlugin

execute

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

Specified by:
execute in class org.cougaar.core.plugin.ComponentPlugin