org.mule.routing
Class DynamicRoundRobin
java.lang.Object
org.mule.routing.DynamicRoundRobin
- All Implemented Interfaces:
- MuleContextAware, Initialisable, MessageProcessor
public class DynamicRoundRobin
- extends Object
- implements MessageProcessor, Initialisable, MuleContextAware
RoundRobin divides the messages it receives among its target routes in round-robin
fashion. The set of routes is obtained dynamically using a DynamicRouteResolver
This includes messages received on all threads, so there is no guarantee
that messages received from a splitter are sent to consecutively numbered targets.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicRoundRobin
public DynamicRoundRobin()
process
public MuleEvent process(MuleEvent event)
throws MuleException
- Description copied from interface:
MessageProcessor
- Invokes the MessageProcessor.
- Specified by:
process
in interface MessageProcessor
- Parameters:
event
- MuleEvent to be processed
- Returns:
- optional response MuleEvent
- Throws:
MuleException
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext
in interface MuleContextAware
setDynamicRouteResolver
public void setDynamicRouteResolver(DynamicRouteResolver dynamicRouteResolver)
- Parameters:
dynamicRouteResolver
- custom identifiable route resolver to use
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.