xsmeral.pipe
Class PipeAttachedProcessor

java.lang.Object
  extended by xsmeral.pipe.PipeAttachedProcessor
All Implemented Interfaces:
Runnable, AttachedProcessor
Direct Known Subclasses:
StatsWriter

public class PipeAttachedProcessor
extends Object
implements AttachedProcessor

Basic attached processor associated to a Pipe instance.


Field Summary
protected  boolean error
           
 
Constructor Summary
PipeAttachedProcessor()
           
 
Method Summary
 boolean canStart()
          Indicates whether this processor has met conditions for starting.
protected  void detach()
          The processor removes itself from the Pipe's list of attached processors.
 Map<String,String> getParams()
          Returns the parameter map used to initialize this processor.
 Pipe getPipe()
          Returns the associated Pipe.
 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 run()
          Starts the processor.
 void setParams(Map<String,String> params)
           
 void setPipe(Pipe pipe)
          Associates the processor with a Pipe.
 void stop()
          Signals the processor to release resources and cease running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

error

protected boolean error
Constructor Detail

PipeAttachedProcessor

public PipeAttachedProcessor()
Method Detail

initialize

public AttachedProcessor initialize(Map<String,String> params)
Description copied from interface: AttachedProcessor
Initializes the processor with given parameter map and returns itself.

Specified by:
initialize in interface AttachedProcessor

setPipe

public void setPipe(Pipe pipe)
Description copied from interface: AttachedProcessor
Associates the processor with a Pipe.

Specified by:
setPipe in interface AttachedProcessor

getPipe

public Pipe getPipe()
Returns the associated Pipe.


getParams

public Map<String,String> getParams()
Returns the parameter map used to initialize this processor.


setParams

public void setParams(Map<String,String> params)

canStart

public boolean canStart()
Description copied from interface: AttachedProcessor
Indicates whether this processor has met conditions for starting.

Specified by:
canStart in interface AttachedProcessor

preContext

public void preContext()
Description copied from interface: AttachedProcessor
Called before context is assigned to object processors, can be used for resource injection.

Specified by:
preContext in interface AttachedProcessor

postContext

public void postContext()
Description copied from interface: AttachedProcessor
Called after context has been assigned to all processors.

Specified by:
postContext in interface AttachedProcessor

chainStopped

public void chainStopped()
Description copied from interface: AttachedProcessor
Called after all object processors in chain stopped running.

Specified by:
chainStopped in interface AttachedProcessor

stop

public void stop()
Description copied from interface: AttachedProcessor
Signals the processor to release resources and cease running.

Specified by:
stop in interface AttachedProcessor

run

public void run()
Starts the processor.

Specified by:
run in interface Runnable

detach

protected void detach()
The processor removes itself from the Pipe's list of attached processors.