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{
|
|
|
|
|
private ActorRef responder;
|
|
|
|
|
|
|
|
|
|
public CustomRouteBuilder(ActorRef responder) {
|
|
|
|
|
this.responder = responder;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void configure() throws Exception {
|
2012-07-18 08:06:07 +02:00
|
|
|
from("jetty:http://localhost:8877/camel/custom").to(CamelPath.toUri(responder));
|
2012-07-15 14:12:03 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//#CustomRoute
|