Package org.opennms.core.tasks
Class ContainerTask<T extends ContainerTask<?>>
- java.lang.Object
-
- org.opennms.core.tasks.AbstractTask
-
- org.opennms.core.tasks.ContainerTask<T>
-
- All Implemented Interfaces:
Task
- Direct Known Subclasses:
BatchTask
,SequenceTask
public abstract class ContainerTask<T extends ContainerTask<?>> extends AbstractTask
Abstract ContainerTask class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.core.tasks.Task
Task.State
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractTask
m_triggerTask
-
Constructor Summary
Constructors Constructor Description ContainerTask(TaskCoordinator coordinator, ContainerTask<?> parent)
Constructor for ContainerTask.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SyncTask
add(Runnable runnable)
addSyncTask
add(Runnable runnable, String schedulingHint)
addvoid
add(AbstractTask task)
addvoid
add(NeedsContainer needsContainer)
addvoid
add(RunInBatch runInBatch)
addprotected void
addChildDependencies(AbstractTask child)
addChildDependenciesvoid
addPrerequisite(AbstractTask task)
Adds prereq as a Prerequisite of this task.protected void
completeSubmit()
This method exists to allow a task to have no processingTaskBuilder<T>
getBuilder()
getBuilderprotected AbstractTask
getTriggerTask()
getTriggerTaskvoid
preSchedule()
preSchedule-
Methods inherited from class org.opennms.core.tasks.AbstractTask
addDependent, doSubmit, getCoordinator, getMonitor, isScheduled, postSchedule, schedule, toString, waitFor, waitFor
-
-
-
-
Field Detail
-
m_triggerTask
protected final AbstractTask m_triggerTask
-
-
Constructor Detail
-
ContainerTask
public ContainerTask(TaskCoordinator coordinator, ContainerTask<?> parent)
Constructor for ContainerTask.
- Parameters:
coordinator
- aTaskCoordinator
object.parent
- aContainerTask
object.
-
-
Method Detail
-
getBuilder
public final TaskBuilder<T> getBuilder()
getBuilder
- Returns:
- a
TaskBuilder
object.
-
addPrerequisite
public void addPrerequisite(AbstractTask task)
Adds prereq as a Prerequisite of this task. In other words, this task cannot run until prereq has been completed.- Overrides:
addPrerequisite
in classAbstractTask
- Parameters:
task
- aAbstractTask
object.
-
preSchedule
public void preSchedule()
preSchedule
- Overrides:
preSchedule
in classAbstractTask
-
add
public void add(AbstractTask task)
add
- Parameters:
task
- aTask
object.
-
add
public void add(RunInBatch runInBatch)
add
- Parameters:
runInBatch
- aRunInBatch
object.
-
add
public void add(NeedsContainer needsContainer)
add
- Parameters:
needsContainer
- aNeedsContainer
object.
-
getTriggerTask
protected AbstractTask getTriggerTask()
getTriggerTask
- Returns:
- a
Task
object.
-
completeSubmit
protected void completeSubmit()
This method exists to allow a task to have no processing- Overrides:
completeSubmit
in classAbstractTask
-
addChildDependencies
protected void addChildDependencies(AbstractTask child)
addChildDependencies
- Parameters:
child
- aAbstractTask
object.
-
-