improve migration guide & helpers, plus some docs
This commit is contained in:
parent
f6d71881ea
commit
71d58c5338
3 changed files with 64 additions and 19 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue