Package akka.camel

Examples of akka.camel.Camel.template()


import org.apache.camel.ProducerTemplate;

public class RequestBodyActor extends UntypedActor {
  public void onReceive(Object message) {
    Camel camel = CamelExtension.get(getContext().system());
    ProducerTemplate template = camel.template();
    getSender().tell(template.requestBody("direct:news", message), getSelf());
  }
}
//#RequestProducerTemplate
View Full Code Here


import org.apache.camel.ProducerTemplate;

public class MyActor extends UntypedActor {
  public void onReceive(Object message) {
    Camel camel = CamelExtension.get(getContext().system());
    ProducerTemplate template = camel.template();
    template.sendBody("direct:news", message);
  }
}
//#ProducerTemplate
View Full Code Here

  public void getCamelExtension() {
    //#CamelExtension
    ActorSystem system = ActorSystem.create("some-system");
    Camel camel = CamelExtension.get(system);
    CamelContext camelContext = camel.context();
    ProducerTemplate producerTemplate = camel.template();
    //#CamelExtension
    JavaTestKit.shutdownActorSystem(system);
  }
  public void addActiveMQComponent() {
    //#CamelExtensionAddComponent
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.