org.schmant.task.proxy
Class TimedExecutionTask
java.lang.Object
org.schmant.support.AbstractArgumentChecker
org.schmant.task.stub.AbstractTask<T>
org.schmant.task.stub.AbstractActionTask<T>
org.schmant.task.stub.AbstractProcessTask<T>
org.schmant.task.template.proxy.AbstractProxyTask<TimedExecutionTask>
org.schmant.task.proxy.TimedExecutionTask
- All Implemented Interfaces:
- Producer<Object>, TaskDependency, ActionTaskConfigurable<TimedExecutionTask>, ActionTaskSpec<TimedExecutionTask>, LoggingConfigurable<TimedExecutionTask>, OverwriteConfigurable<TimedExecutionTask>, SourceConfigurable<TimedExecutionTask>, SourceConfigured, TargetConfigurable<TimedExecutionTask>, TargetConfigured, GeneratorTaskConfigurable<TimedExecutionTask>, GeneratorTaskSpec<TimedExecutionTask>, ProcessTaskConfigurable<TimedExecutionTask>, ProcessTaskSpec<TimedExecutionTask>, Task, TaskRunnable, TaskSpecification<TimedExecutionTask>
public final class TimedExecutionTask
- extends AbstractProxyTask<TimedExecutionTask>
- implements Producer<Object>
See TimedExecutionTF
- Since:
- 0.5
- Author:
- Karl Gustafsson
- Task_package:
- org.schmant.task.base
Methods inherited from class org.schmant.task.stub.AbstractTask |
cancel, createTask, getDefaultLogFooter, getDependencyForTasksScheduledByThisTask, getDependencyObservable, getFailureCause, getLogFooter, getLogHeader, getSatisfiedStateLock, getThis, isCancelled, isDone, isInterrupted, isRunning, isSatisfied, isSuccessful, run, setLogFooter, setLogHeader, setReportLevel, setTraceLogging |
get
public Object get()
- Description copied from interface:
Producer
- Returns the produced object, or
null
if nothing is produced
yet.
This method should be implemented thread-safe.
- Specified by:
get
in interface Producer<Object>
- Returns:
- The produced object.
validate
protected Collection<String> validate(Report r)
- Description copied from class:
AbstractActionTask
- Override the method inherited from
AbstractTask
to give a validation
error if no source is set (and AbstractActionTask.isSourcesMandatory()
is true
).
Subclasses may override this to add their own validations.
- Overrides:
validate
in class AbstractProxyTask<TimedExecutionTask>
- Parameters:
r
- A report to log warning and debug messages to. Validation errors
should not be logged, though. They are logged later.
- Returns:
- A collection of error messages.
runInternal
protected void runInternal(Report r)
throws InterruptedException
- Description copied from class:
AbstractTask
- Subclasses implement this. The task is
AbstractTask.validate(Report)
:d before
this method is called, see AbstractTask.run()
.
- Specified by:
runInternal
in class AbstractTask<TimedExecutionTask>
- Parameters:
r
- The current thread's Report
.
- Throws:
InterruptedException
copyProperties
public void copyProperties(TimedExecutionTask spec)
- Description copied from class:
AbstractActionTask
- Override the implementation from
AbstractTask
to copy the
source properties. Subclasses must override this to copy their own
properties.
- Specified by:
copyProperties
in interface TaskSpecification<TimedExecutionTask>
- Overrides:
copyProperties
in class AbstractProxyTask<TimedExecutionTask>
- Parameters:
spec
- The specification to copy properties to.
toString
public String toString()
- Description copied from class:
AbstractTask
- Default implementation for tasks. Task implementations may override this.
It is used in the default log header that is written (level INFO) before
a task is run.
This implementation just returns the class name.
- Overrides:
toString
in class AbstractProcessTask<TimedExecutionTask>