public class TryMessageProcessor extends AbstractMessageProcessorOwner implements Processor
Processor with a transaction.
If the TransactionConfig is null then no transaction is used and the next
Processor is invoked directly.ReactiveProcessor.ProcessingType| Modifier and Type | Field and Description |
|---|---|
protected MessageProcessorChain |
nestedChain |
protected MuleTransactionConfig |
transactionConfig |
flowConstruct, messagingExceptionHandler, muleContext| Constructor and Description |
|---|
TryMessageProcessor() |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<Event> |
apply(org.reactivestreams.Publisher<Event> publisher)
Applies a
Publisher function transforming a stream of Event's. |
void |
dispose() |
protected List<Processor> |
getOwnedMessageProcessors() |
MuleTransactionConfig |
getTransactionConfig()
Obtain the
TransactionConfig configured that defines transactional behaviour of this scope. |
void |
initialise() |
Event |
process(Event event)
Invokes the MessageProcessor.
|
void |
setExceptionListener(MessagingExceptionHandler exceptionListener)
Configures the
MessagingExceptionHandler that should be used to handle any errors that occur in this scope. |
void |
setMessageProcessors(List<Processor> processors)
Configure the nested
Processor's that error handling and transactional behaviour should be applied to. |
void |
setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler) |
void |
setTransactionConfig(MuleTransactionConfig transactionConfig)
Configures the
TransactionConfig that that defines the transactional behaviour of this scope. |
void |
start() |
void |
stop() |
getOwnedObjectsgetFlowConstruct, getMuleContext, setFlowConstruct, setMuleContextgetAnnotation, getAnnotations, getLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessingTypesetMuleContextsetFlowConstructprotected MessageProcessorChain nestedChain
protected MuleTransactionConfig transactionConfig
public Event process(Event event) throws org.mule.runtime.api.exception.MuleException
Processorpublic org.reactivestreams.Publisher<Event> apply(org.reactivestreams.Publisher<Event> publisher)
ProcessorPublisher function transforming a stream of Event's.
The default implementation delegates to Processor.process(Event) and will:
Processor.process(Event) returns null.public void setExceptionListener(MessagingExceptionHandler exceptionListener)
MessagingExceptionHandler that should be used to handle any errors that occur in this scope.exceptionListener - the MessagingExceptionHandler to be used.public void setTransactionConfig(MuleTransactionConfig transactionConfig)
TransactionConfig that that defines the transactional behaviour of this scope.transactionConfig - the TransactionConfig to be used.public MuleTransactionConfig getTransactionConfig()
TransactionConfig configured that defines transactional behaviour of this scope.TransactionConfig.public void setMessageProcessors(List<Processor> processors)
Processor's that error handling and transactional behaviour should be applied to.processors - public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableinitialise in class AbstractMuleObjectOwner<Processor>org.mule.runtime.api.lifecycle.InitialisationExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposabledispose in class AbstractMuleObjectOwner<Processor>public void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startablestart in class AbstractMuleObjectOwner<Processor>org.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppablestop in class AbstractMuleObjectOwner<Processor>org.mule.runtime.api.exception.MuleExceptionprotected List<Processor> getOwnedMessageProcessors()
getOwnedMessageProcessors in class AbstractMessageProcessorOwnerpublic void setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler)
setMessagingExceptionHandler in interface MessagingExceptionHandlerAwaresetMessagingExceptionHandler in class AbstractMuleObjectOwner<Processor>Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.