improve migration guide & helpers, plus some docs

This commit is contained in:
Roland 2012-01-23 11:58:27 +01:00
parent f6d71881ea
commit 71d58c5338
3 changed files with 64 additions and 19 deletions

View file

@ -112,13 +112,12 @@ object Patterns {
* <b>Recommended usage example:</b>
*
* {{{
* val f = ask(worker, request)(timeout)
* flow {
* EnrichedRequest(request, f())
* } pipeTo nextActor
* final Future<Object> f = Patterns.ask(worker, request, timeout);
* // apply some transformation (i.e. enrich with request info)
* final Future<Object> transformed = f.map(new akka.japi.Function<Object, Object>() { ... });
* // send it on to the next stage
* Patterns.pipeTo(transformed, nextActor);
* }}}
*
* [see [[akka.dispatch.Future]] for a description of `flow`]
*/
def pipeTo[T](future: Future[T], actorRef: ActorRef): Future[T] = akka.pattern.pipeTo(future, actorRef)