ActorContext.getParent for Java API #22413

This commit is contained in:
Johan Andrén 2017-03-16 09:30:00 +01:00 committed by GitHub
parent 5ff44194a3
commit 2eb226ed32
213 changed files with 1319 additions and 1523 deletions

View file

@ -1,15 +0,0 @@
package docs.camel;
//#ProducerTemplate
import akka.actor.UntypedAbstractActor;
import akka.camel.Camel;
import akka.camel.CamelExtension;
import org.apache.camel.ProducerTemplate;
public class MyActor extends UntypedAbstractActor {
public void onReceive(Object message) {
Camel camel = CamelExtension.get(getContext().system());
ProducerTemplate template = camel.template();
template.sendBody("direct:news", message);
}
}
//#ProducerTemplate