public abstract class AbstractRequestResponseMessageProcessor extends AbstractInterceptingMessageProcessor
Processor 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(CoreEvent) method. Symmetrically, if you need to define a process to be executed
during the response phase, then you should override the processResponse(CoreEvent) 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(CoreEvent, MessagingException) method.
ReactiveProcessor.ProcessingTypelogger, muleContext, next| Constructor and Description |
|---|
AbstractRequestResponseMessageProcessor() |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<CoreEvent> |
apply(org.reactivestreams.Publisher<CoreEvent> publisher) |
CoreEvent |
process(CoreEvent event) |
protected CoreEvent |
processCatch(CoreEvent event,
MessagingException exception) |
protected void |
processFinally(CoreEvent event,
MessagingException exception)
Used to perform post processing after both request and response phases have been completed.
|
protected ReactiveProcessor |
processRequest()
Processes the request phase before the next message processor is invoked.
|
protected CoreEvent |
processRequest(CoreEvent request)
Processes the request phase before the next message processor is invoked.
|
protected ReactiveProcessor |
processResponse()
Processes the response phase after the next message processor and it's response phase have been invoked
|
protected CoreEvent |
processResponse(CoreEvent response)
Processes the response phase after the next message processor and it's response phase have been invoked
|
applyNext, getFlowConstruct, getListener, getMuleContext, isEventValid, processNext, setListener, setMuleContext, toStringgetAnnotation, getAnnotations, getLocation, getRootContainerName, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetListenergetProcessingTypepublic AbstractRequestResponseMessageProcessor()
public CoreEvent process(CoreEvent event) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionpublic org.reactivestreams.Publisher<CoreEvent> apply(org.reactivestreams.Publisher<CoreEvent> publisher)
protected CoreEvent processRequest(CoreEvent request) throws org.mule.runtime.api.exception.MuleException
request - event to be processed.org.mule.runtime.api.exception.MuleException - exception thrown by implementations of this method whiile performing response processingprotected ReactiveProcessor processRequest()
protected CoreEvent processResponse(CoreEvent response) throws org.mule.runtime.api.exception.MuleException
response - response event to be processed.org.mule.runtime.api.exception.MuleException - exception thrown by implementations of this method whiile performing response processingprotected ReactiveProcessor processResponse()
protected void processFinally(CoreEvent 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 nullprotected CoreEvent processCatch(CoreEvent event, MessagingException exception) throws MessagingException
MessagingExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.