|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.pipeline.stage.BaseStage
public abstract class BaseStage
This is a simple base class for Stages with no-op implementations of the
preprocess(), #process(), postprocess(),
and release() methods.
| Field Summary | |
|---|---|
protected StageContext |
context
The context in which the stage runs. |
| Constructor Summary | |
|---|---|
BaseStage()
|
|
| Method Summary | |
|---|---|
void |
emit(Object obj)
Convenience method to feed the specified object to the next stage downstream. |
void |
emit(String branch,
Object obj)
Convenience method to feed the specified object to the first stage of the specified branch. |
void |
init(StageContext context)
This implementation of init() simply stores a reference to the stage context. |
void |
postprocess()
No-op implementation. |
void |
preprocess()
No-op implementation. |
void |
process(Object obj)
The only operation performed by this implementation of process() is to feed the specified object to the downstream feeder. |
void |
release()
No-op implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected StageContext context
| Constructor Detail |
|---|
public BaseStage()
| Method Detail |
|---|
public void init(StageContext context)
init in interface Stagecontext - the StageContext within which the stage sill be run
public void preprocess()
throws StageException
preprocess in interface StageStageException - an Exception thrown by an overriding implementation should
be wrapped in a StageExceptionStage.preprocess()
public void process(Object obj)
throws StageException
process in interface Stageobj - Object to be passed to downstream pipeline.
StageException - an Exception thrown by an overriding implementation should
be wrapped in a StageException
public void postprocess()
throws StageException
postprocess in interface StageStageException - an Exception thrown by an overriding implementation should
be wrapped in a StageExceptionpublic void release()
release in interface StageStage.release()public final void emit(Object obj)
public final void emit(String branch,
Object obj)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||