org.mule.processor
Class TransactionalInterceptingMessageProcessor

java.lang.Object
  extended by org.mule.processor.AbstractInterceptingMessageProcessorBase
      extended by org.mule.processor.AbstractInterceptingMessageProcessor
          extended by org.mule.processor.TransactionalInterceptingMessageProcessor
All Implemented Interfaces:
AnnotatedObject, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, InterceptingMessageProcessor, MessageProcessor, MessageProcessorContainer, MessageSource

public class TransactionalInterceptingMessageProcessor
extends AbstractInterceptingMessageProcessor
implements Lifecycle, MuleContextAware

Wraps the invocation of the next MessageProcessor with a transaction. If the TransactionConfig is null then no transaction is used and the next MessageProcessor is invoked directly.


Field Summary
protected  MessagingExceptionHandler exceptionListener
           
protected  MuleTransactionConfig transactionConfig
           
 
Fields inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
logger, muleContext, next, notificationHandler
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
TransactionalInterceptingMessageProcessor()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 void initialise()
          Method used to perform any initialisation work.
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void setExceptionListener(MessagingExceptionHandler exceptionListener)
           
 void setTransactionConfig(MuleTransactionConfig transactionConfig)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
addMessageProcessorPathElements, getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, processNext, setAnnotations, setListener, setMuleContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.api.source.MessageSource
setListener
 

Field Detail

exceptionListener

protected MessagingExceptionHandler exceptionListener

transactionConfig

protected MuleTransactionConfig transactionConfig
Constructor Detail

TransactionalInterceptingMessageProcessor

public TransactionalInterceptingMessageProcessor()
Method Detail

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Specified by:
process in interface MessageProcessor
Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException

setExceptionListener

public void setExceptionListener(MessagingExceptionHandler exceptionListener)

setTransactionConfig

public void setTransactionConfig(MuleTransactionConfig transactionConfig)

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

start

public void start()
           throws MuleException
Specified by:
start in interface Startable
Throws:
MuleException

stop

public void stop()
          throws MuleException
Specified by:
stop in interface Stoppable
Throws:
MuleException


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.