public abstract class AbstractRequestResponseMessageProcessor extends AbstractInterceptingMessageProcessor implements NonBlockingSupported
MessageProcessor that may performs processing during both
the request and response processing phases while supporting non-blocking execution.
In order to define the process during the request phase you should override the processRequest(org.mule.api.MuleEvent)
method.
Symmetrically, if you need to define a process to be executed during the response phase, then you should override
the processResponse(org.mule.api.MuleEvent) method.
In some cases you'll have some code that should be always executed, even if an error occurs, for those cases you
should override the processFinally(org.mule.api.MuleEvent, org.mule.api.MessagingException) method.logger, muleContext, next, notificationHandlerPROPERTY_NAME| Constructor and Description |
|---|
AbstractRequestResponseMessageProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected ReplyToHandler |
createReplyToHandler(MuleEvent event) |
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
protected MuleEvent |
processBlocking(MuleEvent event) |
protected void |
processFinally(MuleEvent event,
MessagingException exception)
Used to perform post processing after both request and response phases have been completed.
|
protected MuleEvent |
processNonBlocking(MuleEvent event) |
protected MuleEvent |
processRequest(MuleEvent event)
Processes the request phase before the next message processor is invoked.
|
protected MuleEvent |
processResponse(MuleEvent event)
Processes the response phase after the next message processor and it's response phase have been invoked
|
addMessageProcessorPathElements, getListener, getMuleContext, isEventValid, processNext, setListener, setMuleContext, toStringgetAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetListenerpublic AbstractRequestResponseMessageProcessor()
public final MuleEvent process(MuleEvent event) throws MuleException
MessageProcessorprocess in interface MessageProcessorevent - MuleEvent to be processedMuleExceptionprotected MuleEvent processBlocking(MuleEvent event) throws MuleException
MuleExceptionprotected MuleEvent processNonBlocking(MuleEvent event) throws MuleException
MuleExceptionprotected ReplyToHandler createReplyToHandler(MuleEvent event)
protected MuleEvent processRequest(MuleEvent event) throws MuleException
event - event to be processed.MuleException - exception thrown by implementations of this method whiile performing response processingprotected MuleEvent processResponse(MuleEvent event) throws MuleException
event - event to be processed.MuleException - exception thrown by implementations of this method whiile performing response processingprotected void processFinally(MuleEvent event, MessagingException exception)
event - the result of request and response processing. Note that this includes the request and response
processing of the rest of the Flow following this message processor too.exception - the exception thrown during processing if any. If not exception was thrown then this parameter
is nullCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.