Hello,

It's not so easy to get the "to" as it is to get the "from" for a camel
route. I have a similar webapp that you use to manage some specific camel
routes and here is an example of a code that reads the existing routes from
camel context and show them in a nice data grid interface:

// Fetch destination endpoint
String[] toSplitted;
if (route.getRouteContext().getRoute().getOutputs().get(0) instanceof
FilterDefinition) {
        transformer =
route.getRouteContext().getRoute().getOutputs().get(0).getOutputs().get(0).getLabel();
        if
(route.getRouteContext().getRoute().getOutputs().get(0).getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().startsWith("log"))
{
                toSplitted = null;
        } else {
                toSplitted =
route.getRouteContext().getRoute().getOutputs().get(0).getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().split(":");
        }
} else {
        transformer =
route.getRouteContext().getRoute().getOutputs().get(1).getLabel();
        if
(route.getRouteContext().getRoute().getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().startsWith("log"))
{
                toSplitted = null;
        } else {
                toSplitted =
route.getRouteContext().getRoute().getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().split(":");
        }
}




--
View this message in context: 
http://camel.465427.n5.nabble.com/Getting-route-info-problems-tp5741035p5741099.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to