2012-07-15 14:12:03 +02:00
|
|
|
package docs.camel;
|
|
|
|
|
//#CustomRoute
|
|
|
|
|
import akka.actor.ActorRef;
|
|
|
|
|
import akka.camel.internal.component.CamelPath;
|
|
|
|
|
import org.apache.camel.builder.RouteBuilder;
|
|
|
|
|
|
|
|
|
|
public class CustomRouteBuilder extends RouteBuilder{
|
2012-07-23 01:36:12 +02:00
|
|
|
private String uri;
|
2012-07-15 14:12:03 +02:00
|
|
|
|
|
|
|
|
public CustomRouteBuilder(ActorRef responder) {
|
2012-07-23 01:36:12 +02:00
|
|
|
uri = CamelPath.toUri(responder);
|
2012-07-15 14:12:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void configure() throws Exception {
|
2012-07-23 01:36:12 +02:00
|
|
|
from("jetty:http://localhost:8877/camel/custom").to(uri);
|
2012-07-15 14:12:03 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//#CustomRoute
|