org.d_haven.event.command

Class EventPipelineRunner

public class EventPipelineRunner extends Object implements Runnable

Created by IntelliJ IDEA. User: bloritsch Date: Jun 9, 2004 Time: 10:57:03 AM To change this template use File | Settings | File Templates.
Field Summary
intm_numEntries
EventPipelinem_pipeline
Constructor Summary
EventPipelineRunner(EventPipeline pipeline)
Create an EventPipelineRunner with the supplied pipeline and a policy of dequeueing one entry at a time.
EventPipelineRunner(EventPipeline pipeline, int numEntries)
Create an EventPipelineRunner with the supplied pipeline and number of events to dequeue at a time.
Method Summary
intgetNumEntries()
Return the number of entries to process at one time.
EventPipelinegetPipeline()
Get the pipeline we are processing at this time.
voidrun()
The run method will process events once and then end.
StringtoString()

Field Detail

m_numEntries

private final int m_numEntries

m_pipeline

private final EventPipeline m_pipeline

Constructor Detail

EventPipelineRunner

public EventPipelineRunner(EventPipeline pipeline)
Create an EventPipelineRunner with the supplied pipeline and a policy of dequeueing one entry at a time.

Parameters: pipeline the pipeline to run

EventPipelineRunner

public EventPipelineRunner(EventPipeline pipeline, int numEntries)
Create an EventPipelineRunner with the supplied pipeline and number of events to dequeue at a time. Any number less than 1 will dequeue all the events.

Parameters: pipeline the pipeline to run numEntries the number of entries to dequeue

Method Detail

getNumEntries

public int getNumEntries()
Return the number of entries to process at one time.

Returns: the number of entries as an integer

getPipeline

public EventPipeline getPipeline()
Get the pipeline we are processing at this time.

Returns: the pipeline we are running

run

public void run()
The run method will process events once and then end. The runnable can be re-run if desired.

toString

public String toString()