| org.cougaar.core.plugin.ComponentPlugin org.cougaar.core.adaptivity.ServiceUserPluginBase
All known Subclasses: org.cougaar.logistics.plugin.trans.tools.CPUTestPlugin, org.cougaar.core.adaptivity.OperatingModePolicyManager, org.cougaar.core.adaptivity.PolicyRemoteTestPlugin,
ServiceUserPluginBase | abstract public class ServiceUserPluginBase extends ComponentPlugin (Code) | | 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.
|
Method Summary | |
protected boolean | acquireServices() 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. | protected void | cancelTimer() Cancel the timer. | public void | load() | protected void | startTimer(long delay) | protected boolean | timerExpired() Test if the timer has expired. | public void | unload() |
ServiceUserPluginBase | protected ServiceUserPluginBase(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
ConditionServiceProvider.execute for a typical
usage pattern.
|
cancelTimer | protected void cancelTimer()(Code) | | Cancel the timer.
|
load | public void load()(Code) | | Override to get a logger on load
|
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
|
|
|