net.sf.bus.spi
Class AsyncDispatcher

java.lang.Object
  |
  +--net.sf.bus.spi.AbstractDispatcher
        |
        +--net.sf.bus.spi.AsyncDispatcher
All Implemented Interfaces:
Dispatcher

public class AsyncDispatcher
extends AbstractDispatcher

Delivers messages to all subscribers in an asynchronous manner. The implementation uses a QueuedExecutor to dispatch each published message on a background thread, in order

Version:
$Revision: 1.2 $
Author:
James Higginbotham

Constructor Summary
AsyncDispatcher()
           
 
Method Summary
 void dispatch(java.lang.Object message, java.util.Iterator subscribers)
          Dispatch the message using the given master list of subscribers
 
Methods inherited from class net.sf.bus.spi.AbstractDispatcher
createFilter, processDispatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncDispatcher

public AsyncDispatcher()
Method Detail

dispatch

public void dispatch(java.lang.Object message,
                     java.util.Iterator subscribers)
Description copied from interface: Dispatcher
Dispatch the message using the given master list of subscribers
Following copied from interface: net.sf.bus.spi.Dispatcher
Parameters:
message - the message Object
subscribers - an Iterator pointing to the master list of subscribers, that must be filtered by the dispatcher.


This code may be freely distributed and modified under the terms of the GNU Lesser General Public Licence..