camel docs java
This commit is contained in:
parent
016eaffbfb
commit
2472e46263
39 changed files with 1479 additions and 15 deletions
23
akka-docs/java/code/docs/camel/sample/http/HttpConsumer.java
Normal file
23
akka-docs/java/code/docs/camel/sample/http/HttpConsumer.java
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package docs.camel.sample.http;
|
||||
|
||||
import akka.actor.ActorRef;
|
||||
import akka.camel.javaapi.UntypedConsumerActor;
|
||||
|
||||
//#HttpExample
|
||||
public class HttpConsumer extends UntypedConsumerActor{
|
||||
|
||||
private ActorRef producer;
|
||||
|
||||
public HttpConsumer(ActorRef producer){
|
||||
this.producer = producer;
|
||||
}
|
||||
|
||||
public String getEndpointUri() {
|
||||
return "jetty:http://0.0.0.0:8875/";
|
||||
}
|
||||
|
||||
public void onReceive(Object message) {
|
||||
producer.forward(message, getContext());
|
||||
}
|
||||
}
|
||||
//#HttpExample
|
||||
Loading…
Add table
Add a link
Reference in a new issue