org.cougaar.core.plugin
Class ComponentPlugin

java.lang.Object
  extended by org.cougaar.util.GenericStateModelAdapter
      extended by org.cougaar.core.blackboard.BlackboardClientComponent
          extended by org.cougaar.core.plugin.ComponentPlugin
All Implemented Interfaces:
BlackboardClient, org.cougaar.core.component.Component, PluginBase, org.cougaar.util.GenericStateModel
Direct Known Subclasses:
AbstractMobilityPlugin, AddAgentExamplePlugin, AgentControlPlugin, AgentLoadLoggerPlugin, AgentLoadRatePlugin, AgentLoadSensorPlugin, AgentLoadTracePlugin, AgentStatusRatePlugin, ConditionServiceProvider, DeletionPlugin, DemoTimeControlPlugin, MetricsServletPlugin, MoveAgentPlugin, OperatingModeServiceProvider, ParameterizedPlugin, PersistenceAdapterPlugin, PingReceiver, PingSender, PlaybookManager, PolicyInjectorPlugin, RedirectMovePlugin, RootControlPlugin, ServiceUserPlugin, ServiceUserPluginBase, SimpleRelayExample, TestABA, TestFullSnapshot, TimestampServicePlugin

public abstract class ComponentPlugin
extends BlackboardClientComponent
implements PluginBase

This component is a base class for standard blackboard-client "plugins".

Create a derived class by implementing setupSubscriptions() and execute().

Note that both "precycle()" and "cycle()" will be run by the scheduler. This means that the scheduling order in relation to other scheduled Components may be *random* (i.e. this ComponentPlugin might load first but be precycled last!). In general a Component should not make assumptions about the load or schedule ordering.


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
ComponentPlugin()
           
 
Method Summary
protected abstract  void execute()
          Called every time this component is scheduled to run.
protected  org.cougaar.util.ConfigFinder getConfigFinder()
           
protected abstract  void setupSubscriptions()
          Called once after initialization, as a "pre-execute()".
 
Methods inherited from class org.cougaar.core.blackboard.BlackboardClientComponent
currentTimeMillis, cycle, getAgentIdentifier, getAlarmService, getBindingSite, getBlackboardClientName, getBlackboardService, getMessageAddress, getParameter, getParameters, getServiceBroker, halt, load, 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, load, resume, start, stop, suspend, unload
 

Constructor Detail

ComponentPlugin

public ComponentPlugin()
Method Detail

setupSubscriptions

protected abstract void setupSubscriptions()
Called once after initialization, as a "pre-execute()".

Specified by:
setupSubscriptions in class BlackboardClientComponent

execute

protected abstract void execute()
Called every time this component is scheduled to run.

Specified by:
execute in class BlackboardClientComponent

getConfigFinder

protected org.cougaar.util.ConfigFinder getConfigFinder()