Interface RouteConfigurationsBuilder


public interface RouteConfigurationsBuilder
Low-level SPI interface for objects that can contribute route configurations to a CamelContext.

Route configurations are shared cross-cutting concerns (such as error handlers, interceptors, and on-exception clauses) that can be applied to multiple Routes without repeating them inside each individual route definition. They are built alongside routes using RouteConfigurationBuilder (the Java DSL subtype) or the YAML / XML equivalents.

This interface is analogous to RoutesBuilder but targets configuration artifacts rather than executable routes. Implementations register the configurations in the CamelContext prior to route startup so that each route can resolve them by id.

Since:
3.12
See Also:
  • Method Details

    • addRouteConfigurationsToCamelContext

      void addRouteConfigurationsToCamelContext(CamelContext context) throws Exception
      Adds the route configurations from this builder to the CamelContext.
      Parameters:
      context - the Camel context
      Throws:
      Exception - is thrown if initialization of route configurations failed
    • updateRouteConfigurationsToCamelContext

      void updateRouteConfigurationsToCamelContext(CamelContext context) throws Exception
      Adds or updates the route configurations from this builder to the CamelContext.
      Parameters:
      context - the Camel context
      Throws:
      Exception - is thrown if initialization of route configurations failed