2012-07-15 14:12:03 +02:00
|
|
|
package docs.camel.sample.http;
|
|
|
|
|
|
|
|
|
|
import akka.actor.*;
|
|
|
|
|
|
|
|
|
|
public class HttpSample {
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
//#HttpExample
|
|
|
|
|
// Create the actors. this can be done in a Boot class so you can
|
2012-10-02 10:21:46 +02:00
|
|
|
// run the example in the MicroKernel. Just add the three lines below
|
|
|
|
|
// to your boot class.
|
2012-07-15 14:12:03 +02:00
|
|
|
ActorSystem system = ActorSystem.create("some-system");
|
2013-04-14 22:56:41 +02:00
|
|
|
|
|
|
|
|
final ActorRef httpTransformer = system.actorOf(
|
|
|
|
|
Props.create(HttpTransformer.class));
|
2012-07-15 14:12:03 +02:00
|
|
|
|
2013-04-14 22:56:41 +02:00
|
|
|
final ActorRef httpProducer = system.actorOf(
|
|
|
|
|
Props.create(HttpProducer.class, httpTransformer));
|
|
|
|
|
|
|
|
|
|
final ActorRef httpConsumer = system.actorOf(
|
|
|
|
|
Props.create(HttpConsumer.class, httpProducer));
|
2012-07-15 14:12:03 +02:00
|
|
|
//#HttpExample
|
|
|
|
|
}
|
|
|
|
|
}
|