org.apache.commons.pipeline.testFramework
Class FaultingTestStage
java.lang.Object
org.apache.commons.pipeline.testFramework.TestStage
org.apache.commons.pipeline.testFramework.FaultingTestStage
- All Implemented Interfaces:
- Stage
public class FaultingTestStage
- extends TestStage
This stage will generate StageExceptions for every other object this
stage processes. By design, the even numbered objects will cause a StageException
to be thrown (counting the first object as 1).
|
Method Summary |
void |
process(Object obj)
Implementations of this method should atomically process a single data
object and transfer any feed objects resulting from this processing to
the downstream Feeder. |
FaultingTestStage
public FaultingTestStage(int index)
process
public void process(Object obj)
throws StageException
- Description copied from interface:
Stage
- Implementations of this method should atomically process a single data
object and transfer any feed objects resulting from this processing to
the downstream
Feeder. This Feeder can be obtained from
the stage context made available during initialization.
NOTE: Implementations of this method must be thread-safe!
- Specified by:
process in interface Stage- Overrides:
process in class TestStage
- Parameters:
obj - an object to be processed
- Throws:
StageException - any checked Exception thrown by the implementation should
be wrapped in a StageException
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.