Package akka.actor

Examples of akka.actor.ActorSystem.stop()


    ActorSystem system = ActorSystem.create("some-system");
    Camel camel = CamelExtension.get(system);
    ActorRef responder = system.actorOf(Props.create(Responder.class), "TestResponder");
    camel.context().addRoutes(new CustomRouteBuilder(responder));
    //#CustomRoute
    system.stop(responder);
    JavaTestKit.shutdownActorSystem(system);
  }
}
View Full Code Here


    Future<ActorRef> activationFuture = camel.activationFutureFor(producer,
      timeout, system.dispatcher());
    //#CamelActivation
    //#CamelDeactivation
    // ..
    system.stop(producer);
    // get a future reference to the deactivation of the endpoint of the Consumer Actor
    Future<ActorRef> deactivationFuture = camel.deactivationFutureFor(producer,
      timeout, system.dispatcher());
    //#CamelDeactivation
    JavaTestKit.shutdownActorSystem(system);
View Full Code Here

    ActorSystem system = ActorSystem.create("some-system");
    Props props = Props.create(FirstProducer.class);
    ActorRef producer = system.actorOf(props,"myproducer");
    Future<Object> future = Patterns.ask(producer, "some request", 1000);
    //#AskProducer
    system.stop(producer);
    JavaTestKit.shutdownActorSystem(system);
  }

  public void correlate(){
    //#Correlate
View Full Code Here

    Map<String,Object> headers = new HashMap<String, Object>();
    headers.put(CamelMessage.MessageExchangeId(),"123");
    producer.tell(new CamelMessage("<order amount=\"100\" currency=\"PLN\" " +
      "itemId=\"12345\"/>",headers), ActorRef.noSender());
    //#Correlate
    system.stop(producer);
    JavaTestKit.shutdownActorSystem(system);
  }
}
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.