Camel
  1. Camel
  2. CAMEL-4428

Avoid references from camel api and spi to model

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8.0
    • Fix Version/s: 3.0.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Currently several interfaces and classes in org.apache.camel and org.apache.camel.spi access classes from org.apache.camel.model.
      As the classes in model are forming the dsl they need access to many other parts of camel. So this creates a lot of dependency cycles. Most importantly these references make the api not self contained.

      So I propose to introduce interfaces on model level that contain the methods that access the model.

      For example there should be a ModelCamelContext that extends CamelContext and contains methods like :
      void startRoute(RouteDefinition route) throws Exception;

      DefautlCamelContext will already implement ModelCamelContext so it is ready for 3.0.

      To achieve maximum compatiblity we should leave the problematic methods in CamelContext but deprecate them.
      For camel 3.0 we will then remvoe these methods.

        Activity

        Hide
        Claus Ibsen added a comment -

        API should be kept stable, moving to 3.0.

        Show
        Claus Ibsen added a comment - API should be kept stable, moving to 3.0.

          People

          • Assignee:
            Unassigned
            Reporter:
            Christian Schneider
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development