|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjconch.pipeline.PipelineStage
jconch.pipeline.Producer<OUT_T>
OUT_T - The type of the object that is produced by this element.public abstract class Producer<OUT_T>
The base implementation of a pipe that produces new elements to retrieve.
| Field Summary | |
|---|---|
protected PipeLink<OUT_T> |
link
The link we drop into. |
| Constructor Summary | |
|---|---|
protected |
Producer(ThreadingModel threading,
PipeLink<OUT_T> link)
Constructor. |
| Method Summary | |
|---|---|
void |
execute()
Checks state, generates an element, and then puts it into the queue. |
PipeLink<OUT_T> |
getLinkOut()
Provides the pipeline link out. |
protected abstract boolean |
isExhausted()
Determines if the pipeline stage will not produce any more elements. |
boolean |
isFinished()
In addition to the basic checks, checks for error conditions. |
abstract OUT_T |
produceItem()
Method that must be implemented to queue the producer. |
| Methods inherited from class jconch.pipeline.PipelineStage |
|---|
getThreadingModel, isStarted, logMessage, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final PipeLink<OUT_T> link
| Constructor Detail |
|---|
protected Producer(ThreadingModel threading,
PipeLink<OUT_T> link)
threading - The threading model.link - The link we produce things into.
org.apache.commons.lang.NullArgumentException - If either argument is null.| Method Detail |
|---|
public PipeLink<OUT_T> getLinkOut()
null.public abstract OUT_T produceItem()
null if there
are no more elements.public final boolean isFinished()
isFinished in class PipelineStagepublic final void execute()
execute in class PipelineStageprotected abstract boolean isExhausted()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||