| org.cougaar.core.plugin.ComponentPlugin org.cougaar.core.plugin.ServiceUserPlugin
All known Subclasses: org.cougaar.planning.plugin.adaptivity.TaskRateSensorPlugin, org.cougaar.core.adaptivity.ThreatconTestPlugin, org.cougaar.core.persist.Exercise, org.cougaar.core.plugin.freeze.FreezePlugin, org.cougaar.core.adaptivity.MetricsTestPlugin, org.cougaar.planning.plugin.completion.CompletionPlugin, org.cougaar.core.adaptivity.CPUTestPlugin, org.cougaar.core.adaptivity.LateOperatingModePlugin, org.cougaar.core.persist.PersistenceControlPlugin, org.cougaar.core.adaptivity.CPURemoteTestPlugin, org.cougaar.core.adaptivity.PolicyTestPlugin, org.cougaar.core.adaptivity.AdaptivityEngine, org.cougaar.core.persist.PersistenceMetricsServlet, org.cougaar.planning.plugin.adaptivity.TaskSensorPlugin,
ServiceUserPlugin | abstract public class ServiceUserPlugin extends ComponentPlugin (Code) | | This component is a convenience base class for plugins that
need to acquire services that may not be immediately available
when first started.
Records the service classes needed and attempts acquire them
on request. Also provides timer services.
Instead of using this class, consider using a
org.cougaar.core.component.ServiceAvailableListener .
|
ServiceUserPlugin | protected ServiceUserPlugin(Class[] serviceClasses)(Code) | | Constructor
Parameters: serviceClasses - the service classes needed for this pluginto operate. |
acquireServices | protected boolean acquireServices()(Code) | | Test if all services specified in the constructor are available.
Sub-classes should call this method from their setupSubscriptions
and execute methods until it returns true. Once this method
returns true, the services should be requested and normal
operation started. Once all the services are available, this
method simply returns true. See haveServices() in
org.cougaar.core.adaptivity.ConditionServiceProvider.execute ConditionServiceProvider for a typical usage pattern.
|
cancelTimer | protected void cancelTimer()(Code) | | Cancel the timer.
|
getTimer | protected Alarm getTimer()(Code) | | access the timer itself (if any)
|
getTimerExpirationTime | protected long getTimerExpirationTime()(Code) | | When will (has) the timer expire
|
hasUnexpiredTimer | protected boolean hasUnexpiredTimer()(Code) | | Returns true IFF there is an unexpired timer.
|
load | public void load()(Code) | | Override to get a logger on load
|
resetTimer | protected void resetTimer(long delay)(Code) | | Schedule a update wakeup after some interval of time
Parameters: delay - how long to delay before the timer expires. |
startTimer | protected void startTimer(long delay)(Code) | | Schedule a update wakeup after some interval of time
Parameters: delay - how long to delay before the timer expires. |
timerExpired | protected boolean timerExpired()(Code) | | Test if the timer has expired.
false if the timer is not running or has not yet expiredelse return true. |
unload | public void unload()(Code) | | Override to release a logger on load
|
|
|