public abstract class AbstractRoutingStrategy extends Object implements RoutingStrategy
Modifier and Type | Field and Description |
---|---|
protected static Log |
logger
logger used by this class
|
protected static List<String> |
magicProperties
These properties are automatically propagated by Mule from inbound to outbound
|
Constructor and Description |
---|
AbstractRoutingStrategy(MuleContext muleContext) |
Modifier and Type | Method and Description |
---|---|
protected static void |
assertNonConsumableMessage(MuleEvent event,
MuleMessage message)
Asserts that the
MuleMessage in the MuleEvent doesn't carry a consumable payload. |
static MuleMessage |
cloneMessage(MuleEvent event,
MuleMessage message,
MuleContext muleContext) |
static MuleMessage |
cloneMessage(MuleMessage message,
MuleContext muleContext)
Create a fresh copy of a message.
|
protected MuleEvent |
createEventToRoute(MuleEvent routedEvent,
MuleMessage message,
MessageProcessor route)
Create a new event to be routed to the target MP
|
protected MuleContext |
getMuleContext() |
static void |
propagateMagicProperties(MuleMessage in,
MuleMessage out)
Propagates a number of internal system properties to handle correlation, session, etc.
|
protected MuleEvent |
sendRequest(MuleEvent routedEvent,
MuleMessage message,
MessageProcessor route,
boolean awaitResponse)
Send message event to destination.
|
static void |
validateMessageIsNotConsumable(MuleEvent event,
MuleMessage message)
Validates that the payload is not consumable so it can be copied.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
route
protected static List<String> magicProperties
protected static transient Log logger
public AbstractRoutingStrategy(MuleContext muleContext)
protected final MuleEvent sendRequest(MuleEvent routedEvent, MuleMessage message, MessageProcessor route, boolean awaitResponse) throws MuleException
routedEvent
- event to routemessage
- message to routeroute
- message processor to be executedawaitResponse
- if theMuleException
protected MuleEvent createEventToRoute(MuleEvent routedEvent, MuleMessage message, MessageProcessor route)
public static MuleMessage cloneMessage(MuleMessage message, MuleContext muleContext)
protected MuleContext getMuleContext()
public static void propagateMagicProperties(MuleMessage in, MuleMessage out)
public static void validateMessageIsNotConsumable(MuleEvent event, MuleMessage message) throws MessagingException
event
- message
- MessagingException
public static MuleMessage cloneMessage(MuleEvent event, MuleMessage message, MuleContext muleContext) throws MessagingException
MessagingException
protected static void assertNonConsumableMessage(MuleEvent event, MuleMessage message) throws MessagingException
MuleMessage
in the MuleEvent
doesn't carry a consumable payload. This method
is useful for routers which need to clone the message before dispatching the message to multiple routes.event
- The MuleEvent
.event
- The MuleMessage
whose payload is to be verified.MessagingException
- If the payload of the message is consumable.Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.