org.springframework.integration.dispatcher
Class SimpleDispatcher

java.lang.Object
  extended by org.springframework.integration.dispatcher.AbstractDispatcher
      extended by org.springframework.integration.dispatcher.SimpleDispatcher
All Implemented Interfaces:
MessageDispatcher

public class SimpleDispatcher
extends AbstractDispatcher

Basic implementation of MessageDispatcher that will attempt to send a Message to one of its handlers. As soon as one of the handlers accepts the Message, the dispatcher will return 'true'.

If the dispatcher has no handlers, a MessageDeliveryException will be thrown. If all handlers reject the Message, the dispatcher will throw a MessageRejectedException.

Author:
Mark Fisher

Field Summary
 
Fields inherited from class org.springframework.integration.dispatcher.AbstractDispatcher
handlers, logger
 
Constructor Summary
SimpleDispatcher()
           
 
Method Summary
 boolean dispatch(Message<?> message)
           
 
Methods inherited from class org.springframework.integration.dispatcher.AbstractDispatcher
addHandler, getTaskExecutor, removeHandler, sendMessageToHandler, setTaskExecutor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleDispatcher

public SimpleDispatcher()
Method Detail

dispatch

public boolean dispatch(Message<?> message)