org.apache.camel.processor.exceptionpolicy
Class DefaultExceptionPolicyStrategy
java.lang.Object
org.apache.camel.processor.exceptionpolicy.DefaultExceptionPolicyStrategy
- All Implemented Interfaces:
- ExceptionPolicyStrategy
public class DefaultExceptionPolicyStrategy
- extends Object
- implements ExceptionPolicyStrategy
The default strategy used in Camel to resolve the ExceptionType
that should
handle the thrown exception.
This strategy applies the following rules:
- The exception type must be configured with an Exception that is an instance of the thrown exception
- If the exception type has exactly the thrown exception then its selected
- Otherwise the type that has an exception that is super of the thrown exception is selected
(recurring up the exception hierarchy)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultExceptionPolicyStrategy
public DefaultExceptionPolicyStrategy()
getExceptionPolicy
public ExceptionType getExceptionPolicy(Map<Class,ExceptionType> exceptionPolicices,
Exchange exchange,
Throwable exception)
- Description copied from interface:
ExceptionPolicyStrategy
- Resolves the
ExceptionType
that should handle the thrown exception.
- Specified by:
getExceptionPolicy
in interface ExceptionPolicyStrategy
- Parameters:
exceptionPolicices
- the configured exception policies to resolve fromexchange
- the exchangeexception
- the exception that was thrown
- Returns:
- the resolved exception type to handle this exception, null if none found.
Copyright © 2008 IONA Open Source Community. All Rights Reserved.