public class FutureRef$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static FutureRef$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
FutureRef$() |
Modifier and Type | Method and Description |
---|---|
FutureRef<java.lang.Object> |
apply(ActorSystem system,
Timeout timeout)
Constructs a new FutureRef which will be completed with the first message sent to it.
|
FutureRef<java.lang.Object> |
apply(Timeout timeout,
ActorSystem system)
Constructs a new PromiseRef which will be completed with the first message sent to it.
|
<T> FutureRef<T> |
wrap(ActorRef actorRef,
scala.concurrent.Future<T> future)
Wraps an ActorRef and a Future into a FutureRef.
|
public static final FutureRef$ MODULE$
public <T> FutureRef<T> wrap(ActorRef actorRef, scala.concurrent.Future<T> future)
actorRef
- (undocumented)future
- (undocumented)public FutureRef<java.lang.Object> apply(ActorSystem system, Timeout timeout)
// enables transparent use of FutureRef as ActorRef and Future
import FutureRef.Implicits._
val futureRef = FutureRef(system, 5.seconds)
futureRef ! "message"
futureRef.onComplete(println) // prints "message"
system
- (undocumented)timeout
- (undocumented)public FutureRef<java.lang.Object> apply(Timeout timeout, ActorSystem system)
// enables transparent use of FutureRef as ActorRef and Promise
import FutureRef.Implicits._
// requires an implicit ActorSystem in scope
val futureRef = FutureRef(5.seconds)
futureRef ! "message"
futureRef.onComplete(println) // prints "message"
timeout
- (undocumented)system
- (undocumented)