public interface MessageProcessPhase<Template extends MessageProcessTemplate>
MessageProcessTemplate
The phase will be part of a chain of responsibility were the phase can define the end of the execution of the set of phases by
calling: - PhaseResultNotifier.phaseConsumedMessage() which indicates that the phase has consume the message and it
should not be longer processed - PhaseResultNotifier.phaseFailure(Exception) which indicates that there was a failure
during message processing.
Whenever a phase finish execution it must call PhaseResultNotifier.phaseSuccessfully() which will cause the next phase
to be executed.
Optionally a MessageProcessPhase can implement Comparable to define the order in which it
must be positioned in the MessageProcessPhase chain| Modifier and Type | Method and Description |
|---|---|
void |
runPhase(Template messageProcessTemplate,
MessageProcessContext messageProcessContext,
PhaseResultNotifier phaseResultNotifier)
Process the template through the phase.
|
boolean |
supportsTemplate(MessageProcessTemplate messageProcessTemplate)
Determines if a certain phase supports a given template.
|
boolean supportsTemplate(MessageProcessTemplate messageProcessTemplate)
messageProcessTemplate - template to be processedvoid runPhase(Template messageProcessTemplate, MessageProcessContext messageProcessContext, PhaseResultNotifier phaseResultNotifier)
PhaseResultNotifier.phaseFailure(Exception) must
be call.messageProcessTemplate - template containing message source specific behaviormessageProcessContext - provides context information for executing the messagephaseResultNotifier - notifier that must be advice under certain scenariosCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.