3 Replies Latest reply on Aug 27, 2013 9:43 AM by kcbabo

    Route annotation does not have To support

    tonyeverett

      Hello.

       

      When using the @Route / RouteScanner, I noticed that there is no implementation for the To side of a route.

       

      In the code, this is what one finds:

       

      public class RouteScanner implements Scanner<SwitchYardModel> {

          @Override

          public ScannerOutput<SwitchYardModel> scan(ScannerInput<SwitchYardModel> input) throws IOException {

           ....

                  // Component reference definition(s)

                  // Need to add these!

       

      Is it planned to get this implemented?

       

      Thanks

        • 1. Re: Route annotation does not have To support
          kcbabo

          The issue with generating references from a Camel route is that we don't know the interface and input/output types that will be used for the contract.  Since all references require a contract, the only solution would be to stub out an interface in the generation step.  FWIW, the Eclipse-based tooling provides a lot of flexibility to define references and create an interface at the same.

          • 2. Re: Route annotation does not have To support
            tonyeverett

            For me the visual tooling is of course an option, but far less attractive because annotations provide a huge productivity boon. One can stay in the Java world with all the benefits of typesafe annotations and the mature refactoring capability of the IDE.

             

            Would you consider this missing implementation a bug or a feature request? Routes are pretty central to what we do.

             

            Thanks.

            • 3. Re: Route annotation does not have To support
              kcbabo

              I would consider it an enhancement since it was deliberately excluded pending consensus on how to handle the contract question.  We have focused much less on annotation-based config generation since the tooling provides you with so much more.  That said, I totally understand and appreciate your perspective w/r/t the value of annotations.  If you would like to see this added, please go ahead and file a JIRA.  If you have thoughts on how you would like to see the contract definition handled, feel free to add them to the JIRA or in this forum thread.

               

              SwitchYard - JBoss Issue Tracker