【发布时间】:2012-06-18 06:08:40
【问题描述】:
在 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);
【问题讨论】:
-
你好,angelokh。你搞清楚了吗?