Package com.rapiddweller.task
Class StateTrackingTaskProxy<E extends Task>
- java.lang.Object
-
- com.rapiddweller.task.AbstractTask
-
- com.rapiddweller.task.TaskProxy<E>
-
- com.rapiddweller.task.StateTrackingTaskProxy<E>
-
- Type Parameters:
E
- the type parameter
- All Implemented Interfaces:
com.rapiddweller.common.MessageHolder
,com.rapiddweller.common.ThreadAware
,Task
,java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Cloneable
public class StateTrackingTaskProxy<E extends Task> extends TaskProxy<E>
Task proxy that remembers the result of the last execution step and provides it as propertyavailable
.
Created: 05.02.2010 10:41:55- Since:
- 0.6
- Author:
- Volker Bergmann
-
-
Field Summary
Fields Modifier and Type Field Description protected TaskResult
state
The State.-
Fields inherited from class com.rapiddweller.task.AbstractTask
taskName
-
-
Constructor Summary
Constructors Constructor Description StateTrackingTaskProxy(E realTask)
Instantiates a new State tracking task proxy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StateTrackingTaskProxy<E>
clone()
TaskResult
execute(com.rapiddweller.common.Context context, com.rapiddweller.common.ErrorHandler errorHandler)
Executes the task's work, possibly interacting with the context.boolean
isAvailable()
Is available boolean.java.lang.String
toString()
-
Methods inherited from class com.rapiddweller.task.TaskProxy
close, getMessage, getRealTask, isParallelizable, isThreadSafe, pageFinished, setRealTask
-
Methods inherited from class com.rapiddweller.task.AbstractTask
getTaskName, setTaskName
-
-
-
-
Field Detail
-
state
protected volatile TaskResult state
The State.
-
-
Constructor Detail
-
StateTrackingTaskProxy
public StateTrackingTaskProxy(E realTask)
Instantiates a new State tracking task proxy.- Parameters:
realTask
- the real task
-
-
Method Detail
-
isAvailable
public boolean isAvailable()
Is available boolean.- Returns:
- the boolean
-
execute
public TaskResult execute(com.rapiddweller.common.Context context, com.rapiddweller.common.ErrorHandler errorHandler)
Description copied from interface:Task
Executes the task's work, possibly interacting with the context.
-
clone
public StateTrackingTaskProxy<E> clone()
-
-