
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.
|
List<PeriodicTask> |
getPeriodicTasks() |
void |
init()
Called from the enclosing
Subsystem at initialization
phase. |
void |
postStop()
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, waitbuild, postBuild, postInit, postStart, shutdownNow, start, stoppublic AgentPeriodicTaskService(Agent a)
a - The Agent this Service belongs to.public void init()
HasLifecycleSubsystem at initialization
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 postStop()
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
postStop 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 Duration@Command(name="getAgentPeriodicTaskNames", description="Get the list of the names of the scheduled tasks", type=QUERY, category=SYSTEM) public List<String> getAgentPeriodicTaskNames()
public List<PeriodicTask> getPeriodicTasks()
Copyright © 2017 LSST. All rights reserved.