org.openorb.notify.queue

Class EventQueueReceiver

public class EventQueueReceiver extends NotifyThread

Author: Olivier Modica Shawn Boyce

Constructor Summary
EventQueueReceiver(String id, EventQueue queue, Logger logger)
Default constructor
Method Summary
voidaddDispatcher(EventDispatcher newDispatcher)
This method adds a dispatcher
voidpushEvent(Object event)
This method is invoked by the proxy upon receipt of a new event.
voidremoveDispatcher(EventDispatcher oldDispatcher)
This method removes a dispatcher
voidrun()
The run method waits for new events and pushes them in the queue
voidstopThread()
Stop the thread

Constructor Detail

EventQueueReceiver

public EventQueueReceiver(String id, EventQueue queue, Logger logger)
Default constructor

Method Detail

addDispatcher

public void addDispatcher(EventDispatcher newDispatcher)
This method adds a dispatcher

pushEvent

public void pushEvent(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.

removeDispatcher

public void removeDispatcher(EventDispatcher oldDispatcher)
This method removes a dispatcher

run

public void run()
The run method waits for new events and pushes them in the queue

stopThread

public void stopThread()
Stop the thread