public abstract class AbstractTransportMessageProcessTemplate<MessageReceiverType extends AbstractMessageReceiver,ConnectorType extends AbstractConnector> extends Object implements FlowProcessingPhaseTemplate, ValidationPhaseTemplate
Constructor and Description |
---|
AbstractTransportMessageProcessTemplate(MessageReceiverType messageReceiver) |
Modifier and Type | Method and Description |
---|---|
abstract Object |
acquireMessage()
This method will only be called once for the
MessageProcessContext |
void |
afterFailureProcessingFlow(MessagingException messagingException)
Call when the processing of the message through the flow fails.
|
void |
afterFailureProcessingFlow(MuleException exception)
Call when the processing of the message through the flow fails in an exception strategy
|
MuleEvent |
afterRouteEvent(MuleEvent muleEvent)
Post processing of the routed
MuleEvent |
void |
afterSuccessfulProcessingFlow(MuleEvent response)
Call after successfully processing the message through the flow
This method will always be called when the flow execution was successful.
|
MuleEvent |
beforeRouteEvent(MuleEvent muleEvent)
Pre processing of the
MuleEvent to route |
protected MuleEvent |
createEventFromMuleMessage(MuleMessage muleMessage) |
protected MuleMessage |
createMessageFromSource(Object message) |
void |
discardInvalidMessage()
Discards the message because the validation failed
|
protected ConnectorType |
getConnector() |
FlowConstruct |
getFlowConstruct() |
protected InboundEndpoint |
getInboundEndpoint() |
protected MessageReceiverType |
getMessageReceiver() |
protected MuleContext |
getMuleContext() |
MuleEvent |
getMuleEvent() |
Object |
getOriginalMessage() |
protected OutputStream |
getOutputStream() |
protected void |
propagateRootMessageIdProperty(MuleMessage message) |
MuleEvent |
routeEvent(MuleEvent muleEvent)
Routes the
MuleEvent through the processors chain |
boolean |
validateMessage()
Validates the message content.
|
protected void |
warnIfMuleClientSendUsed(MuleMessage message) |
protected transient Log logger
public AbstractTransportMessageProcessTemplate(MessageReceiverType messageReceiver)
public MuleEvent getMuleEvent() throws MuleException
getMuleEvent
in interface FlowProcessingPhaseTemplate
MuleEvent
created from the original messageMuleException
public Object getOriginalMessage() throws MuleException
getOriginalMessage
in interface FlowProcessingPhaseTemplate
MuleException
public void afterFailureProcessingFlow(MessagingException messagingException) throws MuleException
FlowProcessingPhaseTemplate
afterFailureProcessingFlow
in interface FlowProcessingPhaseTemplate
MuleException
public void afterFailureProcessingFlow(MuleException exception) throws MuleException
FlowProcessingPhaseTemplate
afterFailureProcessingFlow
in interface FlowProcessingPhaseTemplate
MuleException
public MuleEvent routeEvent(MuleEvent muleEvent) throws MuleException
FlowProcessingPhaseTemplate
MuleEvent
through the processors chainrouteEvent
in interface FlowProcessingPhaseTemplate
muleEvent
- MuleEvent
created from the raw message of this contextMuleEvent
MuleException
public void afterSuccessfulProcessingFlow(MuleEvent response) throws MuleException
FlowProcessingPhaseTemplate
afterSuccessfulProcessingFlow
in interface FlowProcessingPhaseTemplate
MuleException
public abstract Object acquireMessage() throws MuleException
MessageProcessContext
MessageSource
MuleException
protected void propagateRootMessageIdProperty(MuleMessage message)
public boolean validateMessage()
ValidationPhaseTemplate
ValidationPhaseTemplate.discardInvalidMessage()
will be executed so the implementation can save the reason why the message is invalid
to report why the message has been discarded when ValidationPhaseTemplate.discardInvalidMessage()
is calledvalidateMessage
in interface ValidationPhaseTemplate
public void discardInvalidMessage() throws MuleException
ValidationPhaseTemplate
discardInvalidMessage
in interface ValidationPhaseTemplate
MuleException
protected void warnIfMuleClientSendUsed(MuleMessage message)
protected MuleEvent createEventFromMuleMessage(MuleMessage muleMessage) throws MuleException
MuleException
protected OutputStream getOutputStream()
protected MuleMessage createMessageFromSource(Object message) throws MuleException
MuleException
protected MessageReceiverType getMessageReceiver()
protected InboundEndpoint getInboundEndpoint()
protected ConnectorType getConnector()
protected MuleContext getMuleContext()
public FlowConstruct getFlowConstruct()
public MuleEvent beforeRouteEvent(MuleEvent muleEvent) throws MuleException
FlowProcessingPhaseTemplate
MuleEvent
to routebeforeRouteEvent
in interface FlowProcessingPhaseTemplate
MuleException
public MuleEvent afterRouteEvent(MuleEvent muleEvent) throws MuleException
FlowProcessingPhaseTemplate
MuleEvent
afterRouteEvent
in interface FlowProcessingPhaseTemplate
MuleException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.