在 Akka 中,您可以将未来传递给演员。在 Play 2.0 的承诺下怎么可能做到?
http://doc.akka.io/docs/akka/current/scala/actors.html#Ask__Send-And-Receive-Future
final Future<Result> transformed = aggregate.map(new Mapper<Iterable<Object>, Result>() {
public Result apply(Iterable<Object> coll) {
final Iterator<Object> it = coll.iterator();
final String s = (String) it.next();
final int x = (Integer) it.next();
return new Result(x, s);
}
});
pipe(transformed).to(actorC);