- base Props on Deploy, Class and Seq[Any] (i.e. constructor args) - remove deprecated Props usage from akka-docs sample code - rewrite UntypedActorDocTestBase - rewrite Java/Scala doc section on actor creation - add migration guide entry
20 lines
602 B
Java
20 lines
602 B
Java
package docs.camel;
|
|
|
|
import akka.actor.ActorRef;
|
|
import akka.actor.ActorSystem;
|
|
import akka.actor.Props;
|
|
import akka.camel.Camel;
|
|
import akka.camel.CamelExtension;
|
|
|
|
public class CustomRouteTestBase {
|
|
public void customRoute() throws Exception{
|
|
//#CustomRoute
|
|
ActorSystem system = ActorSystem.create("some-system");
|
|
Camel camel = CamelExtension.get(system);
|
|
ActorRef responder = system.actorOf(Props.create(Responder.class), "TestResponder");
|
|
camel.context().addRoutes(new CustomRouteBuilder(responder));
|
|
//#CustomRoute
|
|
system.stop(responder);
|
|
system.shutdown();
|
|
}
|
|
}
|