maito
Interface DataProcessor

All Known Subinterfaces:
DataCollector, Integrator
All Known Implementing Classes:
DataCollectorImpl, IntegratorImpl

public interface DataProcessor

A common interface for subsystems that process data in some way.

Author:
Antti Laitinen

Method Summary
 java.lang.String[] getCurrentTasks()
          Returns a user readable description of every task that is in progress at the moment.
 java.lang.String[] getErrors()
          Returns all errors that have occurred since the last data processing was started.
 void setLogListener(LogListener listener)
          Sets a listener for all log messages sent by this DataProcessor.
 boolean workInProgress()
          Tells whether this DataProcessor is currently processing data.
 

Method Detail

workInProgress

boolean workInProgress()
Tells whether this DataProcessor is currently processing data.

Returns:
true if data is being processed, otherwise false.

getCurrentTasks

java.lang.String[] getCurrentTasks()
Returns a user readable description of every task that is in progress at the moment.

Returns:
An array of String objects containing the description of each task. If no tasks are in progress returns an empty array.

getErrors

java.lang.String[] getErrors()
Returns all errors that have occurred since the last data processing was started. The errors are in a user readable form.

Returns:
An array of String objects where each String is a description of the error. If no errors have occurred the array is empty.

setLogListener

void setLogListener(LogListener listener)
Sets a listener for all log messages sent by this DataProcessor.

Parameters:
listener - The object that listens to this DataProcessor's log messages.