* process the route configuration defined in Groovy class
*/
private Response parseGroovy(String route) {
try {
// load the definition class into a RouteBuilder instance
GroovyClassLoader classLoader = new GroovyClassLoader();
Class<?> clazz = classLoader.parseClass(route);
RouteBuilder builder = (RouteBuilder)clazz.newInstance();
LOG.info("Loaded builder: " + builder);
// add the route builder
getCamelContext().addRoutes(builder);
return Response.seeOther(new URI("/routes")).build();