SMILA 1.0 API documentation

org.eclipse.smila.taskworker
Interface Worker

All Known Implementing Classes:
DeltaCheckerWorker, FileCrawlerWorker, FileFetcherWorker, FinishTaskWorker, PipeletProcessorWorker, PipelineProcessorWorker, ProcessingWorker, UpdatePusherWorker, WebCrawlerWorker, WebFetcherWorker

public interface Worker

Interface for task workers implementing the worker function perform(TaskContext). The implementation must be thread safe.


Method Summary
 java.lang.String getName()
           
 void perform(TaskContext taskContext)
          Performs a computation on the data available in the TaskContext, such as a task for this worker, input and (if configured) output slots.
 

Method Detail

perform

void perform(TaskContext taskContext)
             throws java.lang.Exception
Performs a computation on the data available in the TaskContext, such as a task for this worker, input and (if configured) output slots. An implementor must make sure, calls to this method must be thread-safe!

Parameters:
taskContext - the TaskContext information with which this operation can be performed.
Throws:
java.lang.Exception

getName

java.lang.String getName()
Returns:
the name of the worker. The worker function will be executed for tasks tied to this worker name.

SMILA 1.0 API documentation