public class MessageProcessors extends Object
| Modifier and Type | Method and Description |
|---|---|
static MessageProcessorChain |
newChain(List<Processor> processors)
|
static MessageProcessorChain |
newChain(Processor... processors)
Creates a new
MessageProcessorChain from one or more Processor's. |
static MessageProcessorChain |
newExplicitChain(List<Processor> processors)
|
static MessageProcessorChain |
newExplicitChain(Processor... processors)
Creates a new explicit
MessageProcessorChain from one or more Processor's. |
static Event |
processToApply(Event event,
Flow flow)
Adapt a
Flow used via non-blocking API Function.apply(Object) by blocking and waiting for response
Event or throwing an MuleException in the case of an error. |
static Event |
processToApply(Event event,
MessageProcessorChain messageProcessorChain)
Adapt a
MessageProcessorChain used via non-blocking API Function.apply(Object) by blocking and
waiting for response Event or throwing an MuleException in the case of an error. |
static Event |
processToApply(Event event,
ReactiveProcessor processor)
Adapt a
ReactiveProcessor used via non-blocking API Function.apply(Object) by blocking and waiting
for response Event or throwing an MuleException in the case of an error. |
static org.reactivestreams.Publisher<Event> |
processWithChildContext(Event event,
ReactiveProcessor processor)
Process a
ReactiveProcessor using a child EventContext. |
public static MessageProcessorChain newChain(Processor... processors)
MessageProcessorChain from one or more Processor's. Note that this performs chains construction
but wil not inject MuleContext or FlowConstruct or perform any lifecycle.processors - processors to construct chains from.MessageProcessorChain instance.public static MessageProcessorChain newChain(List<Processor> processors)
MessageProcessorChain from a List of Processor's. Note that this performs chains
construction but wil not inject MuleContext or FlowConstruct or perform any lifecycle.processors - list of processors to construct chains from.MessageProcessorChain instance.public static MessageProcessorChain newExplicitChain(Processor... processors)
MessageProcessorChain from one or more Processor's. Note that this performs chains
construction but wil not inject MuleContext or FlowConstruct or perform any lifecycle.processors - list of processors to construct chains from.MessageProcessorChain instance.public static MessageProcessorChain newExplicitChain(List<Processor> processors)
MessageProcessorChain from a List of Processor's. Note that this performs
chains construction but wil not inject MuleContext or FlowConstruct or perform any lifecycle.processors - list of processors to construct chains from.MessageProcessorChain instance.public static Event processToApply(Event event, ReactiveProcessor processor) throws org.mule.runtime.api.exception.MuleException
ReactiveProcessor used via non-blocking API Function.apply(Object) by blocking and waiting
for response Event or throwing an MuleException in the case of an error.
A plain ReactiveProcessor does not handle EventContext completion or error handling so this method simply
uses just(event).transform(processor).block();event - event to process.processor - processor to adapt.org.mule.runtime.api.exception.MuleExceptionpublic static Event processToApply(Event event, MessageProcessorChain messageProcessorChain) throws org.mule.runtime.api.exception.MuleException
MessageProcessorChain used via non-blocking API Function.apply(Object) by blocking and
waiting for response Event or throwing an MuleException in the case of an error.
A MessageProcessorChain does not handle EventContext completion but does do error handling so this method
manually completes response and then blocks on EventContext response Publisher.event - event to process.messageProcessorChain - processor chain to adapt.org.mule.runtime.api.exception.MuleExceptionpublic static Event processToApply(Event event, Flow flow) throws org.mule.runtime.api.exception.MuleException
Flow used via non-blocking API Function.apply(Object) by blocking and waiting for response
Event or throwing an MuleException in the case of an error.
A Flow handles EventContext completion and error handling so this method dispatches Event to
Flow and then blocks on EventContext response Publisher.event - event to process.flow - flow to adapt.org.mule.runtime.api.exception.MuleExceptionpublic static org.reactivestreams.Publisher<Event> processWithChildContext(Event event, ReactiveProcessor processor)
ReactiveProcessor using a child EventContext. This is useful if it is necessary to performing
processing in a scope and handle an empty result rather than complete the response for the whole Flow.event - the event to process.processor - the processor to process.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.