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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: camel-core
    • Labels:
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: