org.schmant.task.proxy
Class CompoundTask

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.task.stub.AbstractTask<CompoundTask>
          extended by org.schmant.task.proxy.CompoundTask
All Implemented Interfaces:
TaskDependency, LoggingConfigurable<CompoundTask>, Task, TaskRunnable, TaskSpecification<CompoundTask>

public final class CompoundTask
extends AbstractTask<CompoundTask>

See CompoundTF

Since:
0.5
Author:
Karl Gustafsson
Task_package:
org.schmant.task.base

Method Summary
 void copyProperties(CompoundTask spec)
          Copy the properties to the target object.
protected  String getDefaultLogHeader()
          Get the default log header to log (to level INFO) before the task is run if the task user has not set a custom header.
protected  void runInternal(Report r)
          Subclasses implement this.
 String toString()
          Default implementation for tasks.
 
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, validate
 
Methods inherited from class org.schmant.support.AbstractArgumentChecker
check, check, check, check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDefaultLogHeader

protected String getDefaultLogHeader()
Description copied from class: AbstractTask
Get the default log header to log (to level INFO) before the task is run if the task user has not set a custom header. Subclasses may override this to return better headers.

This is called after validating the task.

Return null to disable logging.

Overrides:
getDefaultLogHeader in class AbstractTask<CompoundTask>
Returns:
"Running " + toString()

runInternal

protected void runInternal(Report r)
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<CompoundTask>
Parameters:
r - The current thread's Report.

copyProperties

public void copyProperties(CompoundTask spec)
                    throws UnsupportedOperationException
Description copied from class: AbstractTask
Copy the properties to the target object.

Subclasses must override this to copy their properties. The overriding method must call super.copyProperties.

Specified by:
copyProperties in interface TaskSpecification<CompoundTask>
Overrides:
copyProperties in class AbstractTask<CompoundTask>
Parameters:
spec - The specification to copy properties to.
Throws:
UnsupportedOperationException

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 AbstractTask<CompoundTask>