public abstract class AbstractMessageSplitter extends FilteringOutboundRouter
AbstractMessageSplitter
is an outbound Message Splitter used to split
the contents of a received message into sub parts that can be processed by other
components. Each Part is fired as a separate event to each endpoint on the router. The
endpoints can have filters on them to receive only certain message parts.Modifier and Type | Field and Description |
---|---|
protected boolean |
honorSynchronicity |
protected boolean |
multimatch |
ENABLE_CORRELATION_ALWAYS, ENABLE_CORRELATION_IF_NOT_SET, ENABLE_CORRELATION_NEVER, enableCorrelation, endpoints, logger, messageInfoMapping, replyTo, transactionConfig
muleContext
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractMessageSplitter() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
cleanup()
This method is called after all parts of the original message have been processed;
typically this is the case after
getMessagePart(MuleMessage, OutboundEndpoint)
returned null . |
protected abstract MuleMessage |
getMessagePart(MuleMessage message,
OutboundEndpoint endpoint)
Retrieves a specific message part for the given endpoint.
|
protected abstract void |
initialise(MuleMessage message)
This method can be implemented to split the message up before
getMessagePart(MuleMessage, OutboundEndpoint) method is called. |
boolean |
isHonorSynchronicity() |
MuleMessage |
route(MuleMessage message,
MuleSession session,
boolean synchronous)
This method is responsible for routing the Message via the MuleSession.
|
void |
setHonorSynchronicity(boolean honorSynchronicity)
Sets the flag indicating whether the splitter honurs endpoint settings
|
addEndpoint, getEndpoint, getFilter, getTransformers, isMatch, isUseTemplates, setFilter, setTransformers, setUseTemplates
createTransactionTemplate, dispatch, getEnableCorrelation, getEndpoint, getEndpoints, getMessageInfoMapping, getReplyTo, getTransactionConfig, isDynamicEndpoints, removeEndpoint, send, setEnableCorrelation, setEnableCorrelationAsString, setEndpoints, setMessageInfoMapping, setMessageProperties, setReplyTo, setTransactionConfig
dispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatistics
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRouterStatistics, setRouterStatistics
initialise
dispose
protected boolean multimatch
protected boolean honorSynchronicity
public MuleMessage route(MuleMessage message, MuleSession session, boolean synchronous) throws RoutingException
OutboundRouter
route
in interface OutboundRouter
route
in class FilteringOutboundRouter
message
- the message to send via one or more endpoints on this routersession
- the session used to actually send the eventsynchronous
- whether the invocation process should be synchronous or notRoutingException
FilteringOutboundRouter
,
ExceptionBasedRouter
,
MulticastingRouter
public boolean isHonorSynchronicity()
public void setHonorSynchronicity(boolean honorSynchronicity)
honorSynchronicity
- flag settingprotected abstract void initialise(MuleMessage message)
getMessagePart(MuleMessage, OutboundEndpoint)
method is called.message
- the message being routedprotected abstract MuleMessage getMessagePart(MuleMessage message, OutboundEndpoint endpoint)
message
- the current message being processedendpoint
- the endpoint that will be used to route the resulting message partprotected abstract void cleanup()
getMessagePart(MuleMessage, OutboundEndpoint)
returned null
.Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.