Class ErrorHandlerHelper
- java.lang.Object
-
- org.apache.camel.model.errorhandler.ErrorHandlerHelper
-
public final class ErrorHandlerHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ERROR_HANDLER_BUILDER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isErrorHandlerFactoryConfigured(String ref)
Returns whether a specific error handler builder has been configured or not.protected static org.apache.camel.ErrorHandlerFactory
lookupErrorHandlerFactory(org.apache.camel.CamelContext camelContext)
static org.apache.camel.ErrorHandlerFactory
lookupErrorHandlerFactory(org.apache.camel.Route route, String ref, boolean mandatory)
Lookup the error handler by the given ref
-
-
-
Field Detail
-
DEFAULT_ERROR_HANDLER_BUILDER
public static final String DEFAULT_ERROR_HANDLER_BUILDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
lookupErrorHandlerFactory
public static org.apache.camel.ErrorHandlerFactory lookupErrorHandlerFactory(org.apache.camel.Route route, String ref, boolean mandatory)
Lookup the error handler by the given ref- Parameters:
route
- the routeref
- reference id for the error handlermandatory
- whether the error handler must exists, if not aNoSuchBeanException
is thrown- Returns:
- the error handler
-
lookupErrorHandlerFactory
protected static org.apache.camel.ErrorHandlerFactory lookupErrorHandlerFactory(org.apache.camel.CamelContext camelContext)
-
isErrorHandlerFactoryConfigured
public static boolean isErrorHandlerFactoryConfigured(String ref)
Returns whether a specific error handler builder has been configured or not. Can be used to test if none has been configured and then install a custom error handler builder replacing the default error handler (that would have been used as fallback otherwise).
This is for instance used by the transacted policy to setup a TransactedErrorHandlerBuilder in camel-spring.
-
-