Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15312

camel-core - Parameterized RouteBuilder - add support for life cycle handlers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.5.0
    • camel-core
    • Unknown

    Description

      We should have some option to hook a function when the routes definition is created and/or instantiated something like:

      context.addLifecycleStrategy(new LifecycleStrategySupport() {
          public void onRouteTemplateDefinitionAdd(RouteTemplateDefinition definition) {        
              /* do some validation here */
          }
      });
      
       context.addRouteFromTemplate("myTemplate")
          .routeId("myRouteId")
          .parameter("a", "b")
          .handler(definition -> /* do some validation here */)
          .build()
      

      That would help to add some validation in context such as camel-k when the route templates have some limitations.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            lb Luca Burgazzoli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: