|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.routing.AbstractRouter org.mule.routing.outbound.AbstractOutboundRouter org.mule.routing.outbound.FilteringOutboundRouter org.mule.routing.outbound.AbstractMessageSplitter org.mule.routing.outbound.AbstractRoundRobinMessageSplitter
public class AbstractRoundRobinMessageSplitter
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.
Field Summary |
---|
Fields inherited from class org.mule.routing.outbound.FilteringOutboundRouter |
---|
expressionManager |
Fields inherited from class org.mule.routing.outbound.AbstractOutboundRouter |
---|
ENABLE_CORRELATION_ALWAYS, ENABLE_CORRELATION_IF_NOT_SET, ENABLE_CORRELATION_NEVER, enableCorrelation, endpoints, logger, messageInfoMapping, replyTo, resultsHandler, transactionConfig |
Fields inherited from class org.mule.routing.AbstractRouter |
---|
muleContext |
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
AbstractRoundRobinMessageSplitter()
|
Method Summary | |
---|---|
protected SplitMessage |
getMessageParts(MuleMessage message,
List 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 endpoints) endpoint. |
boolean |
isDisableRoundRobin()
The default behaviour for splitter routers is to round-robin across endpoints. |
boolean |
isFailIfNoMatch()
If none of the endpoints 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 endpoints) endpoint. |
void |
setDisableRoundRobin(boolean disableRoundRobin)
The default behaviour for splitter routers is to round-robin across endpoints. |
void |
setFailIfNoMatch(boolean failIfNoMatch)
If none of the endpoints match a split message part i.e. |
protected List |
splitMessage(MuleMessage message)
Method used just to split the message into parts. |
Methods inherited from class org.mule.routing.outbound.AbstractMessageSplitter |
---|
route |
Methods inherited from class org.mule.routing.outbound.FilteringOutboundRouter |
---|
addEndpoint, getEndpoint, getFilter, getTransformers, isMatch, isRequiresNewMessage, isUseTemplates, setFilter, setTransformers, setUseTemplates |
Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter |
---|
createTransactionTemplate, dispatch, getEnableCorrelation, getEndpoint, getEndpoints, getMessageInfoMapping, getReplyTo, getResultsHandler, getTransactionConfig, isDynamicEndpoints, removeEndpoint, send, setEnableCorrelation, setEnableCorrelationAsString, setEndpoints, setMessageInfoMapping, setMessageProperties, setReplyTo, setResultsHandler, setTransactionConfig |
Methods inherited from class org.mule.routing.AbstractRouter |
---|
dispose, getMuleContext, getRouterStatistics, setMuleContext, setRouterStatistics |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mule.api.routing.Router |
---|
getRouterStatistics, setRouterStatistics |
Methods inherited from interface org.mule.api.lifecycle.Disposable |
---|
dispose |
Constructor Detail |
---|
public AbstractRoundRobinMessageSplitter()
Method Detail |
---|
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 shutdown
RecoverableException
- 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 parts
MuleMessage
objects. Usually, it is sufficient
just to return payload objectsprotected SplitMessage getMessageParts(MuleMessage message, List endpoints)
getMessageParts
in class AbstractMessageSplitter
message
- the current message being processedendpoints
- A list of endpoints that will be used to dispatch each of the parts
List
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 found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |