Package com.rapiddweller.task
Interface Task
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,com.rapiddweller.common.ThreadAware
- All Known Implementing Classes:
AbstractTask
,CompositeTask
,FileDeleter
,FileJoiner
,GenerateAndConsumeTask
,PerfTrackingTaskProxy
,RunnableTask
,SequentialTask
,StateTrackingTaskProxy
,SynchronizedTask
,TaskProxy
,TimedTask
public interface Task extends com.rapiddweller.common.ThreadAware, java.io.Closeable
Interface for the GoF 'Command' pattern. General usage is to call the executeStep() method once or several times for executing the task's work. After usage, close() must be called. When implementing the Task interface, you should preferably inherit fromAbstractTask
, this may compensate for future interface changes.
Created: 06.07.2007 06:30:22- Since:
- 0.2
- Author:
- Volker Bergmann
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
TaskResult
execute(com.rapiddweller.common.Context context, com.rapiddweller.common.ErrorHandler errorHandler)
Executes the task's work, possibly interacting with the context.java.lang.String
getTaskName()
Gets task name.void
pageFinished()
Page finished.
-
-
-
Method Detail
-
getTaskName
java.lang.String getTaskName()
Gets task name.- Returns:
- the name of the task.
-
execute
TaskResult execute(com.rapiddweller.common.Context context, com.rapiddweller.common.ErrorHandler errorHandler)
Executes the task's work, possibly interacting with the context.- Parameters:
context
- the contexterrorHandler
- the error handler- Returns:
- the task result
-
pageFinished
void pageFinished()
Page finished.
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-