Package docs.camel

Source Code of docs.camel.RequestBodyActor

package docs.camel;
//#RequestProducerTemplate
import akka.actor.UntypedActor;
import akka.camel.Camel;
import akka.camel.CamelExtension;
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
TOP

Related Classes of docs.camel.RequestBodyActor

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.