xsmeral.pipe
Interface AttachedProcessor

All Superinterfaces:
Runnable
All Known Implementing Classes:
PipeAttachedProcessor, StatsWriter

public interface AttachedProcessor
extends Runnable

An attached processor can be used to inject resources, monitor object processors, control the pipe or manipulate the processing context. It runs independently of object processors, in a daemon thread. The associated Pipe shouldn't be referenced in the constructor or the initialize method.

See Also:
Pipe, ProcessingContext

Method Summary
 boolean canStart()
          Indicates whether this processor has met conditions for starting.
 void chainStopped()
          Called after all object processors in chain stopped running.
 AttachedProcessor initialize(Map<String,String> params)
          Initializes the processor with given parameter map and returns itself.
 void postContext()
          Called after context has been assigned to all processors.
 void preContext()
          Called before context is assigned to object processors, can be used for resource injection.
 void setPipe(Pipe pipe)
          Associates the processor with a Pipe.
 void stop()
          Signals the processor to release resources and cease running.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

initialize

AttachedProcessor initialize(Map<String,String> params)
Initializes the processor with given parameter map and returns itself.


preContext

void preContext()
Called before context is assigned to object processors, can be used for resource injection.


postContext

void postContext()
Called after context has been assigned to all processors.


chainStopped

void chainStopped()
Called after all object processors in chain stopped running.


stop

void stop()
Signals the processor to release resources and cease running.


setPipe

void setPipe(Pipe pipe)
Associates the processor with a Pipe.


canStart

boolean canStart()
Indicates whether this processor has met conditions for starting.