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());
}
});
}