|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskSpecification<T extends TaskSpecification<T>>
A task specification is an object used by a TaskFactory
to configure
and create a Task
. Unlike the task factory, the task specification
is never reused to create several tasks. After creating a task, the next time
a task factory setter method is called, the task factory copies its previous
task specification (using copyProperties(TaskSpecification)
) and
starts to configure the new specification object.
In practice, Task
:s are their own task specification objects.
Method Summary | |
---|---|
void |
copyProperties(T spec)
Copy this specification's properties to the supplied specification object. |
Task |
createTask()
Create a task from this specification object. |
Methods inherited from interface org.schmant.task.confable.LoggingConfigurable |
---|
setLogFooter, setLogHeader, setReportLevel, setTraceLogging |
Method Detail |
---|
Task createTask()
This method is called by the task factory. After calling this method, the task factory does not modify the specification any more.
void copyProperties(T spec) throws UnsupportedOperationException
If a property is immutable, it can be reused in the target specification. If it is not immutable, such as for instance a collection or a map, a copied should be assigned to the target object.
Note: Implementations must call super.copyProperties(spec)
.
If the task and the task specification is the same object (which they always are), properties pertaining to the state of the task should not be copied to the new specification.
UnsupportedOperationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |