javax.telephony.media.provider
Class EventQueue
java.lang.Object
|
+--javax.telephony.media.provider.Dispatcher
|
+--javax.telephony.media.provider.EventQueue
- All Implemented Interfaces:
- java.lang.Runnable
- public class EventQueue
- extends Dispatcher
Establish a rendevous for event delivery and dispatch.
EventQueue extends Dispatcher, allowing one to post done
Events to a queue.
The Events will be drained from the Queue by the EventQueue
thread which notifies the Listeners.
EventQueue extends Dispatcher to include enqueueDoneEvent().
The EventQueue Dispatacher thread calls getNextEvent()
which dequeues an Event and returns it to be dispatched by the usual
notifyListeners() method.
Base_MediaService queues Async.Events to this EventQueue from onEventDone().
- Since:
- JTAPI-1.4
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EventQueue
public EventQueue()
toString
public java.lang.String toString()
- Overrides:
toString
in class Dispatcher
enqueueDoneEvent
public void enqueueDoneEvent(Base.Event event)
- Queue the given Event to be dispatched by the EventQueue thread.
notifyListeners
public void notifyListeners(Dispatcher.DispatchableEvent event)
- notifyListeners and signal event.done().
- Overrides:
notifyListeners
in class Dispatcher
start
public void start(java.lang.String name)
- restart EventQueue.
- Overrides:
start
in class Dispatcher
stop
public void stop()
- Stop Thread, flush doneEvents from queue.
- Overrides:
stop
in class Dispatcher
flush
public void flush()
- Flush all Events from this EventQueue.
Send comments to: JSR-43@ectf.org