org.d_haven.event.command
Class EventPipelineRunner

java.lang.Object
  extended by org.d_haven.event.command.EventPipelineRunner
All Implemented Interfaces:
java.lang.Runnable

public class EventPipelineRunner
extends java.lang.Object
implements java.lang.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
private  int m_numEntries
           
private  EventPipeline m_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
 int getNumEntries()
          Return the number of entries to process at one time.
 EventPipeline getPipeline()
          Get the pipeline we are processing at this time.
 void run()
          The run method will process events once and then end.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_pipeline

private final EventPipeline m_pipeline

m_numEntries

private final int m_numEntries
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.

Specified by:
run in interface java.lang.Runnable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object