Package org.yamcs.timeline
Class ActivityScheduler
java.lang.Object
com.google.common.util.concurrent.AbstractExecutionThreadService
org.yamcs.timeline.ActivityScheduler
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
,ActivityListener
,ItemListener
public class ActivityScheduler
extends com.google.common.util.concurrent.AbstractExecutionThreadService
implements ItemListener, ActivityListener
Schedules activities in the timeline
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetSpec()
void
init
(TimelineService timelineService, YConfiguration config) void
onActivityUpdated
(Activity activity) An activity is created or updatedvoid
onItemCreated
(TimelineItem item) An item was createdvoid
onItemDeleted
(TimelineItem item) An item was deletedvoid
onItemUpdated
(TimelineItem item) An item was updatedprotected void
run()
protected void
startUp()
protected void
Methods inherited from class com.google.common.util.concurrent.AbstractExecutionThreadService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, shutDown, startAsync, state, stopAsync, toString
-
Constructor Details
-
ActivityScheduler
public ActivityScheduler()
-
-
Method Details
-
getSpec
-
init
-
startUp
- Overrides:
startUp
in classcom.google.common.util.concurrent.AbstractExecutionThreadService
- Throws:
Exception
-
run
- Specified by:
run
in classcom.google.common.util.concurrent.AbstractExecutionThreadService
- Throws:
Exception
-
triggerShutdown
protected void triggerShutdown()- Overrides:
triggerShutdown
in classcom.google.common.util.concurrent.AbstractExecutionThreadService
-
onItemCreated
Description copied from interface:ItemListener
An item was created- Specified by:
onItemCreated
in interfaceItemListener
-
onItemUpdated
Description copied from interface:ItemListener
An item was updated- Specified by:
onItemUpdated
in interfaceItemListener
-
onItemDeleted
Description copied from interface:ItemListener
An item was deleted- Specified by:
onItemDeleted
in interfaceItemListener
-
onActivityUpdated
Description copied from interface:ActivityListener
An activity is created or updated- Specified by:
onActivityUpdated
in interfaceActivityListener
-