net.dpml.util
Class EventQueue

java.lang.Object
  extended by net.dpml.util.EventQueue

public class EventQueue
extends Object

A abstract base class that established an event queue and handles event dispatch operations for listeners declared in classes extending this base class.

Version:
1.1.0
Author:
Digital Product Meta Library

Constructor Summary
EventQueue(Logger logger)
          Deprecated. Use new EventQueue( logger, "Thread name" ) instead.
EventQueue(Logger logger, String name)
          Creation of a new model.
EventQueue(String category)
          Deprecated. Use new EventQueue( logger, "Thread name" ) instead.
EventQueue(String category, String name)
          Creation of a new event queue.
 
Method Summary
 void enqueueEvent(EventObject event)
          Enqueue an event for delivery to registered listeners unless there are no registered listeners.
 void enqueueEvent(EventObject event, boolean waitForCompletion)
          Enqueue an event for delivery to registered listeners unless there are no registered listeners.
 void terminateDispatchThread()
          Terminate the dispatch thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventQueue

public EventQueue(String category)
Deprecated. Use new EventQueue( logger, "Thread name" ) instead.

Creation of a new event queue.

Parameters:
category - the name used to construct a logging channel

EventQueue

public EventQueue(Logger logger)
           throws NullPointerException
Deprecated. Use new EventQueue( logger, "Thread name" ) instead.

Creation of a new model.

Parameters:
logger - the assigned logging channel
Throws:
NullPointerException - if the supplied logging channel is null

EventQueue

public EventQueue(String category,
                  String name)
Creation of a new event queue.

Parameters:
category - the name used to construct a logging channel
name - the name to assign to the thread

EventQueue

public EventQueue(Logger logger,
                  String name)
           throws NullPointerException
Creation of a new model.

Parameters:
logger - the assigned logging channel
name - the name to assign to the thread
Throws:
NullPointerException - if the supplied logging channel or thread name is null
Method Detail

terminateDispatchThread

public void terminateDispatchThread()
Terminate the dispatch thread.


enqueueEvent

public void enqueueEvent(EventObject event)
Enqueue an event for delivery to registered listeners unless there are no registered listeners.

Parameters:
event - the event object to add to the queue

enqueueEvent

public void enqueueEvent(EventObject event,
                         boolean waitForCompletion)
Enqueue an event for delivery to registered listeners unless there are no registered listeners.

Parameters:
event - the event object to add to the queue
waitForCompletion - if TRUE the implementation will apply the event to the event source event handler and return on copmpletion of evetn delivery