org.apache.commons.pipeline.stage
Class RaiseKeyAvailableEventStage

java.lang.Object
  extended by org.apache.commons.pipeline.stage.BaseStage
      extended by org.apache.commons.pipeline.stage.RaiseKeyAvailableEventStage
All Implemented Interfaces:
Stage

public class RaiseKeyAvailableEventStage
extends BaseStage


Field Summary
 
Fields inherited from class org.apache.commons.pipeline.stage.BaseStage
context
 
Constructor Summary
RaiseKeyAvailableEventStage()
          Creates a new instance of RaiseKeyAvailableEventStage
 
Method Summary
 KeyFactory<Object,Object> getKeyFactory()
          Returns the KeyFactory used to create keys for the objects processed by this stage.
 void process(Object obj)
          This implementation of process() simply generates a key for the processed object and raises a KeyAvailableEvent with the generated key, then emits the processed object unchanged.
 void setKeyFactory(KeyFactory<Object,Object> keyFactory)
          Sets the KeyFactory used to create keys for the objects processed by this stage.
 
Methods inherited from class org.apache.commons.pipeline.stage.BaseStage
emit, emit, init, postprocess, preprocess, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RaiseKeyAvailableEventStage

public RaiseKeyAvailableEventStage()
Creates a new instance of RaiseKeyAvailableEventStage

Method Detail

process

public void process(Object obj)
             throws StageException
This implementation of process() simply generates a key for the processed object and raises a KeyAvailableEvent with the generated key, then emits the processed object unchanged.

Specified by:
process in interface Stage
Overrides:
process in class BaseStage
Parameters:
obj - Object to be passed to downstream pipeline.
Throws:
StageException - an Exception thrown by an overriding implementation should be wrapped in a StageException

getKeyFactory

public KeyFactory<Object,Object> getKeyFactory()
Returns the KeyFactory used to create keys for the objects processed by this stage.


setKeyFactory

public void setKeyFactory(KeyFactory<Object,Object> keyFactory)
Sets the KeyFactory used to create keys for the objects processed by this stage.



Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.