public class FutureTools extends Object
| Constructor and Description |
|---|
FutureTools() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
ask(Object message,
akka.actor.ActorRef actorRef)
Send message and wait for result
|
static <T> CompletableFuture<T> |
askFuture(Object message,
akka.actor.ActorRef actorRef)
Send message and get future for result
|
static <T> T |
askReply(Object message,
akka.actor.ActorRef actorRef)
Send message and wait for result
|
static <T> T |
getFail(CompletableFuture future) |
public static <T> T ask(Object message, akka.actor.ActorRef actorRef)
T - the type of the replymessage - the message to sendactorRef - the actor to send message topublic static <T> CompletableFuture<T> askFuture(Object message, akka.actor.ActorRef actorRef)
T - the type of the replymessage - the message to sendactorRef - the actor to send message topublic static <T> T askReply(Object message, akka.actor.ActorRef actorRef)
T - the type of the replymessage - the message to sendactorRef - the actor to send message topublic static <T> T getFail(CompletableFuture future) throws InterruptedException, ExecutionException
Copyright © 2017. All rights reserved.