org.apache.commons.pipeline.stage
Class PipelineShutdownStage

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

public class PipelineShutdownStage
extends BaseStage


Field Summary
 
Fields inherited from class org.apache.commons.pipeline.stage.BaseStage
context
 
Constructor Summary
PipelineShutdownStage()
          Creates a new instance of PipelineShutdownStage
PipelineShutdownStage(int numberOfObjects)
          Creates a new instance of PipelineShutdownStage
 
Method Summary
 void process(Object obj)
          Maintains a count of objects.
 
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

PipelineShutdownStage

public PipelineShutdownStage()
Creates a new instance of PipelineShutdownStage


PipelineShutdownStage

public PipelineShutdownStage(int numberOfObjects)
Creates a new instance of PipelineShutdownStage

Parameters:
numberOfObjects - The number of objects to process before shutting down.
Method Detail

process

public void process(Object obj)
             throws StageException
Maintains a count of objects. If the count equals or exceeds the numberOfObjects then the pipeline is shut down.

Specified by:
process in interface Stage
Overrides:
process in class BaseStage
Parameters:
obj - The objects.
Throws:
StageException - an Exception thrown by an overriding implementation should be wrapped in a StageException


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