Class ErrorHandlerHelper


  • public final class ErrorHandlerHelper
    extends Object
    • 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 route
        ref - reference id for the error handler
        mandatory - whether the error handler must exists, if not a NoSuchBeanException 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.