This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timeout timeout = new Timeout(Duration.parse("20 seconds")); | |
Future<Object> future = Patterns.ask(myActor, new ClientMessage(null), timeout); | |
Promise<Object> sdf = Akka.asPromise(future); | |
Promise<Result> r2 = sdf.map(new Function<Object, Result>() { | |
@Override | |
public Result apply(Object a) throws Throwable { | |
val wsrm = (MyMessage)a; | |
return ok((wsrm).val); // String value from message object |