org.apache.camel.spring.spi
Class TransactionErrorHandler

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.processor.ErrorHandlerSupport
          extended by org.apache.camel.spring.spi.TransactionErrorHandler
All Implemented Interfaces:
Processor, ErrorHandler, Service

public class TransactionErrorHandler
extends ErrorHandlerSupport

The Transactional Client EIP pattern.

Version:
$Revision: 765920 $

Field Summary
 
Fields inherited from class org.apache.camel.processor.ErrorHandlerSupport
log
 
Constructor Summary
TransactionErrorHandler(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
           
TransactionErrorHandler(org.springframework.transaction.support.TransactionTemplate transactionTemplate, Processor output, ExceptionPolicyStrategy exceptionPolicy)
           
 
Method Summary
protected  void doStart()
           
protected  void doStop()
           
 Processor getOutput()
          Returns the output processor
protected  void handleException(Exchange exchange)
          Handles when an exception occured during processing.
 void process(Exchange exchange)
           
protected  String propagationBehaviorToString(int propagationBehavior)
           
 void setOutput(Processor output)
           
 boolean supportTransacted()
           
 String toString()
           
protected  TransactedRuntimeCamelException wrapTransactedRuntimeException(Exception exception)
           
 
Methods inherited from class org.apache.camel.processor.ErrorHandlerSupport
addExceptionPolicy, createDefaultExceptionPolicyStrategy, customProcessorForException, getExceptionPolicy, setExceptionPolicy
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionErrorHandler

public TransactionErrorHandler(org.springframework.transaction.support.TransactionTemplate transactionTemplate)

TransactionErrorHandler

public TransactionErrorHandler(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
                               Processor output,
                               ExceptionPolicyStrategy exceptionPolicy)
Method Detail

supportTransacted

public boolean supportTransacted()
Specified by:
supportTransacted in class ErrorHandlerSupport

toString

public String toString()
Overrides:
toString in class Object

process

public void process(Exchange exchange)

wrapTransactedRuntimeException

protected TransactedRuntimeCamelException wrapTransactedRuntimeException(Exception exception)

handleException

protected void handleException(Exchange exchange)
Handles when an exception occured during processing. Is used to let the exception policy deal with it, eg letting an onException handle it.

Parameters:
exchange - the current exchange

propagationBehaviorToString

protected String propagationBehaviorToString(int propagationBehavior)

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class ServiceSupport
Throws:
Exception

getOutput

public Processor getOutput()
Returns the output processor


setOutput

public void setOutput(Processor output)


Copyright © 2009 Apache Software Foundation. All Rights Reserved.