public class AbstractRoundRobinMessageSplitter extends AbstractMessageSplitter
FilteringListMessageSplitter
accepts a List as a message payload
then routes list elements as messages over an endpoint where the endpoint's filter
accepts the payload.expressionManager
enableCorrelation, initialised, logger, replyTo, resultsHandler, routes, started, transactionConfig
flowConstruct, messagingExceptionHandler, muleContext
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
AbstractRoundRobinMessageSplitter() |
Modifier and Type | Method and Description |
---|---|
protected SplitMessage |
getMessageParts(MuleMessage message,
List<MessageProcessor> endpoints)
Retrieves a specific message part for the given endpoint.
|
void |
initialise()
Method used to perform any initialisation work.
|
boolean |
isDeterministic()
If this option is true (the default)
then the first message part is routed to the first endpoint, the
second part to the second endpoint, etc, with the nth part going to
the (n modulo number of targets) endpoint.
|
boolean |
isDisableRoundRobin()
The default behaviour for splitter routers is to round-robin across
targets.
|
boolean |
isFailIfNoMatch()
If none of the targets match a split message part i.e.
|
void |
setDeterministic(boolean deterministic)
If this option is true (the default)
then the first message part is routed to the first endpoint, the
second part to the second endpoint, etc, with the nth part going to
the (n modulo number of targets) endpoint.
|
void |
setDisableRoundRobin(boolean disableRoundRobin)
The default behaviour for splitter routers is to round-robin across
targets.
|
void |
setFailIfNoMatch(boolean failIfNoMatch)
If none of the targets match a split message part i.e.
|
protected List |
splitMessage(MuleMessage message)
Method used just to split the message into parts.
|
route
addRoute, getFilter, getRoute, getTransformers, isMatch, isTransformBeforeMatch, isUseTemplates, setFilter, setTransformers, setUseTemplates
cloneMessage, cloneMessage, createEventToRoute, dispose, getEnableCorrelation, getMuleContext, getOwnedMessageProcessors, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, isDynamicRoutes, process, propagateMagicProperties, removeRoute, sendRequest, sendRequestEvent, setEnableCorrelation, setEnableCorrelationAsString, setMessageProcessors, setMessageProperties, setReplyTo, setResultsHandler, setRouterStatistics, setRoutes, setTransactionConfig, start, stop
addMessageProcessorPathElements, getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
getFlowConstruct, getMessagingExceptionHandler, setFlowConstruct, setMessagingExceptionHandler, setMuleContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setMuleContext
setFlowConstruct
public void initialise() throws InitialisationException
Initialisable
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.initialise
in interface Initialisable
initialise
in class FilteringOutboundRouter
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered fromprotected List splitMessage(MuleMessage message)
MuleMessage
objects or just payloads (Mule will
automatically convert the payloads into messages).
This method can be overridden by custom implementations of splitter router where the distribution of
the message parts will be done using either round robin or endpoint filtering.message
- the source message to split into partsMuleMessage
objects. Usually, it is sufficient
just to return payload objectsprotected SplitMessage getMessageParts(MuleMessage message, List<MessageProcessor> endpoints)
getMessageParts
in class AbstractMessageSplitter
message
- the current message being processedendpoints
- A list of targets that will be used to dispatch each of the partsList
of message parts. Each part will become the payload of the outgoing
message. Note that the parts will be dispatched toSplitMessage
,
AbstractRoundRobinMessageSplitter
public boolean isDeterministic()
public void setDeterministic(boolean deterministic)
deterministic
- the value to setpublic boolean isDisableRoundRobin()
public void setDisableRoundRobin(boolean disableRoundRobin)
disableRoundRobin
- true if disabledpublic boolean isFailIfNoMatch()
public void setFailIfNoMatch(boolean failIfNoMatch)
failIfNoMatch
- true if an exception should be thrown when no match is foundCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.