Search in sources :

Example 1 with ReplyToHandler

use of org.mule.runtime.core.privileged.connector.ReplyToHandler in project mule by mulesoft.

the class AbstractReplyToPropertyRequestReplyReplier method process.

@Override
public CoreEvent process(CoreEvent event) throws MuleException {
    CoreEvent resultEvent;
    PrivilegedEvent privilegedEvent = (PrivilegedEvent) event;
    if (shouldProcessEvent(privilegedEvent)) {
        Object replyTo = privilegedEvent.getReplyToDestination();
        ReplyToHandler replyToHandler = privilegedEvent.getReplyToHandler();
        resultEvent = processNext(event, empty());
        // Allow components to stop processing of the ReplyTo property (e.g. CXF)
        if (resultEvent != null) {
            // reply-to processing should not resurrect a dead event
            event = processReplyTo(event, resultEvent, replyToHandler, replyTo);
        }
    } else {
        resultEvent = processNext(event, empty());
    }
    return resultEvent;
}
Also used : PrivilegedEvent(org.mule.runtime.core.privileged.event.PrivilegedEvent) ReplyToHandler(org.mule.runtime.core.privileged.connector.ReplyToHandler) CoreEvent(org.mule.runtime.core.api.event.CoreEvent)

Aggregations

CoreEvent (org.mule.runtime.core.api.event.CoreEvent)1 ReplyToHandler (org.mule.runtime.core.privileged.connector.ReplyToHandler)1 PrivilegedEvent (org.mule.runtime.core.privileged.event.PrivilegedEvent)1