
public final class AgentPeriodicTaskService extends Object implements HasLifecycle
| Constructor and Description |
|---|
AgentPeriodicTaskService(Agent a)
Create an instance of the AgentPeriodicTaskService for a given Agent.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAgentPeriodicTaskNames()
Get the list of names of the scheduled tasks.
|
Duration |
getPeriodicTaskPeriod(String taskName)
Get the period of a PeriodicTaks.
|
void |
init()
Called from the enclosing
Subsystem at construction
phase. |
void |
postShutdown()
Called from the enclosing
Subsystem when
Agent.shutdown() has been called after shtudownNow has
been invoked on all the children. |
void |
scheduleAgentPeriodicTask(AgentPeriodicTask task)
Schedule a PeriodicTask.
|
void |
setPeriodicTaskPeriod(String taskName,
Duration period)
Change the period of a PeriodicTask.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostInit, postStart, shutdownNow, startpublic AgentPeriodicTaskService(Agent a)
a - The Agent this Service belongs to.public void init()
HasLifecycleSubsystem at construction
phase.
This method is called before the children components of this
object have their init method called.
At the time it is called, connection to the messaging layer is not yet
done, so there should be no attempt to send messages in the body of
this method. Configuration for message listening can nevertheless be
done here, such as adding MessageListener
objects.
It is unnecessary to call super.init()
init in interface HasLifecyclepublic void postShutdown()
HasLifecycleSubsystem when
Agent.shutdown() has been called after shtudownNow has
been invoked on all the children. At the time it
is called :
PhaseState is CLOSING.
HardwareController.checkStopped() has
been called
postShutdown in interface HasLifecyclepublic void scheduleAgentPeriodicTask(AgentPeriodicTask task)
task - The PeriodicTask to schedulepublic Duration getPeriodicTaskPeriod(String taskName)
taskName - The name of the taskpublic void setPeriodicTaskPeriod(String taskName, Duration period)
taskName - The name of the taskperiod - The period DurationCopyright © 2017 LSST. All rights reserved.