You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2015/03/25 09:19:53 UTC

[jira] [Commented] (CAMEL-2130) add a Visitor API to the org.apache.camel.model package so you can visit a RouteDefinition, a set of RouteDefinitions or a subset of a route to determine things like languages & endpoints used etc

    [ https://issues.apache.org/jira/browse/CAMEL-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379477#comment-14379477 ] 

Claus Ibsen commented on CAMEL-2130:
------------------------------------

Now that we can link from model <-> processor it makes more sense to have a nicer visitor api abstraction for this. We do have the foundation in a helper class in the model to visit the model.



> add a Visitor API to the org.apache.camel.model package so you can visit a RouteDefinition, a set of RouteDefinitions or a subset of a route to determine things like languages & endpoints used etc
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2130
>                 URL: https://issues.apache.org/jira/browse/CAMEL-2130
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: james strachan
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.16.0
>
>
> we should add a ModelVisitor interface to the model classes so that you can visit the model to see what endpoints, languages, dataformats are used - for example for reporting, OSGi dependency tracking or UI reasons.
> {code}
> definition = ...; // a route definition, a node in the route or a set or routes
> SimpleVisitor visitor = new SimpleVisitor();
> definition.visit(visitor);
> System.out.println("The dataformats are: " + visitor.getDataFormats());
> System.out.println("The endpoints are: " + visitor.getEndpoints());
> System.out.println("The expressions are: " + visitor.getExpressions());
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)