org.openorb.notify.queue
Class EventQueueDispatcher

java.lang.Object
  extended by org.openorb.notify.NotifyThread
      extended by org.openorb.notify.queue.EventQueueDispatcher
All Implemented Interfaces:
java.lang.Runnable, ThreadManagement

public class EventQueueDispatcher
extends NotifyThread

Author:
Olivier Modica, Shawn Boyce

Constructor Summary
EventQueueDispatcher(java.lang.String id, EventQueue queue, EventReceiver receiver, org.apache.avalon.framework.logger.Logger logger)
          Default constructor
 
Method Summary
 void pushEvent(java.lang.Object event)
          This method is invoked by the proxy upon receipt of a new event.
 void pushEvents(java.lang.Object[] events)
          This method is invoked by the proxy upon receipt of a new event.
 void run()
          The run method waits for new events and pulls them from the queue
 void stopThread()
          Stop the thread
 
Methods inherited from class org.openorb.notify.NotifyThread
finishWorkAndStopThread, getLogger, resumeThread, startThread, suspendThread, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventQueueDispatcher

public EventQueueDispatcher(java.lang.String id,
                            EventQueue queue,
                            EventReceiver receiver,
                            org.apache.avalon.framework.logger.Logger logger)
Default constructor

Method Detail

pushEvent

public void pushEvent(java.lang.Object event)
This method is invoked by the proxy upon receipt of a new event. If the class is threaded ( call to start() ) then it returns immediately. Else it returns after delivering the event to the connected consumer.


pushEvents

public void pushEvents(java.lang.Object[] events)
This method is invoked by the proxy upon receipt of a new event. If the class is threaded ( call to start() ) then it returns immediately. Else it returns after delivering the event to the connected consumer.


run

public void run()
The run method waits for new events and pulls them from the queue


stopThread

public void stopThread()
Stop the thread

Specified by:
stopThread in interface ThreadManagement
Overrides:
stopThread in class NotifyThread