org.apache.excalibur.event.command
Class TPSPThreadManager.SourceRunner

java.lang.Object
  extended by org.apache.excalibur.event.command.TPSPThreadManager.SourceRunner
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
TPSPThreadManager

protected static final class TPSPThreadManager.SourceRunner
extends java.lang.Object
implements java.lang.Runnable

The SourceRunner is used to dequeue events one at a time.


Field Summary
private  org.apache.excalibur.event.EventHandler m_handler
           
private  boolean m_keepProcessing
           
private  org.apache.excalibur.event.Source m_source
           
 
Constructor Summary
protected TPSPThreadManager.SourceRunner(org.apache.excalibur.event.Source source, org.apache.excalibur.event.EventHandler handler)
          Create a new SourceRunner.
 
Method Summary
 org.apache.excalibur.event.Source getSource()
          Get a reference to the Source.
 void run()
          Called by the PooledExecutor to ensure all components are working.
 void stop()
          Stop the runner nicely.
private static void yield()
          A way to make sure we yield the processor up to the next thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_source

private final org.apache.excalibur.event.Source m_source

m_handler

private final org.apache.excalibur.event.EventHandler m_handler

m_keepProcessing

private volatile boolean m_keepProcessing
Constructor Detail

TPSPThreadManager.SourceRunner

protected TPSPThreadManager.SourceRunner(org.apache.excalibur.event.Source source,
                                         org.apache.excalibur.event.EventHandler handler)
Create a new SourceRunner.

Parameters:
source - The source to pull events from.
handler - The handler to send events to.
Method Detail

run

public void run()
Called by the PooledExecutor to ensure all components are working.

Specified by:
run in interface java.lang.Runnable

yield

private static void yield()
A way to make sure we yield the processor up to the next thread.


stop

public void stop()
Stop the runner nicely.


getSource

public org.apache.excalibur.event.Source getSource()
Get a reference to the Source.

Returns:
the Source