jconch.pipeline.impl
Class FactoryProducer
java.lang.Object
jconch.pipeline.PipelineStage
jconch.pipeline.Producer
jconch.pipeline.impl.FactoryProducer
public abstract class FactoryProducer
- extends Producer
A Producer based off of a Factory implementation.
Implementation Note: Due to a
failing of generics, there is no type-safety available for this
implementation.
- Author:
- Robert Fischer
|
Method Summary |
protected boolean |
isExhausted()
Determines if the pipeline stage will not produce any more elements. |
Object |
produceItem()
Method that must be implemented to queue the producer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FactoryProducer
protected FactoryProducer(Factory source,
ThreadingModel threading,
PipeLink link)
- Constructor.
- Parameters:
source - The factory that will be called to produce new elements.threading - The threading model.link - The link we produce things into.
- Throws:
org.apache.commons.lang.NullArgumentException - If any argument is null.
isExhausted
protected boolean isExhausted()
- Description copied from class:
Producer
- Determines if the pipeline stage will not produce any more elements. This
may be called more than once, and once it returns true, it shall always
return true.
- Specified by:
isExhausted in class Producer
- Returns:
- If the stage is exhausted.
produceItem
public Object produceItem()
- Description copied from class:
Producer
- Method that must be implemented to queue the producer.
- Specified by:
produceItem in class Producer
- Returns:
- The next item for the producer, or
null if there
are no more elements.