Package akka.dispatch

Examples of akka.dispatch.Future.onComplete()


  public static class AsyncFutureActor extends UntypedActor {
    @Override
    public void onReceive(Object message) throws Exception {
      if (message instanceof ActorRef) {
        Future future = ((ActorRef) message).sendRequestReplyFuture("Hello from AsyncFutureActor!", 1000, getContext());
        future.onComplete(new Procedure<Future>() {
          public void apply(Future future) {
            log().logger().info("Result was " + future.result().get());
          }
        });
      }
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.