org.springframework.integration.dispatcher
Class FailOverDispatcher

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

public class FailOverDispatcher
extends AbstractUnicastDispatcher

AbstractUnicastDispatcher that will try it's handlers in the same order every dispatch.

Author:
Mark Fisher, Iwein Fuld

Field Summary
 
Fields inherited from class org.springframework.integration.dispatcher.AbstractDispatcher
logger
 
Constructor Summary
FailOverDispatcher()
           
 
Method Summary
protected  java.util.Iterator<MessageHandler> getHandlerIterator(java.util.List<MessageHandler> handlers)
          Return the iterator that will be used to loop over the handlers.
 
Methods inherited from class org.springframework.integration.dispatcher.AbstractUnicastDispatcher
dispatch
 
Methods inherited from class org.springframework.integration.dispatcher.AbstractDispatcher
addHandler, getHandlers, getTaskExecutor, removeHandler, sendMessageToHandler, setTaskExecutor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FailOverDispatcher

public FailOverDispatcher()
Method Detail

getHandlerIterator

protected java.util.Iterator<MessageHandler> getHandlerIterator(java.util.List<MessageHandler> handlers)
Description copied from class: AbstractUnicastDispatcher
Return the iterator that will be used to loop over the handlers. This allows subclasses to control the order of iteration for each AbstractUnicastDispatcher.dispatch(Message) invocation.

Specified by:
getHandlerIterator in class AbstractUnicastDispatcher
Parameters:
handlers - all handlers for this dispatcher