Packages

t

akka.pattern

PipeToSupport

trait PipeToSupport extends AnyRef

Source
PipeToSupport.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PipeToSupport
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class PipeableCompletionStage[T] extends AnyRef
  2. final class PipeableFuture[T] extends AnyRef

Value Members

  1. implicit def pipe[T](future: Future[T])(implicit executionContext: ExecutionContext): PipeableFuture[T]

    Import this implicit conversion to gain the pipeTo method on scala.concurrent.Future:

    Import this implicit conversion to gain the pipeTo method on scala.concurrent.Future:

    import akka.pattern.pipe
    // requires implicit ExecutionContext, e.g. by importing `context.dispatcher` inside an Actor
    
    Future { doExpensiveCalc() } pipeTo nextActor
    
    or
    
    pipe(someFuture) to nextActor

    The successful result of the future is sent as a message to the recipient, or the failure is sent in a akka.actor.Status.Failure to the recipient.

  2. implicit def pipeCompletionStage[T](future: CompletionStage[T])(implicit executionContext: ExecutionContext): PipeableCompletionStage[T]

    Import this implicit conversion to gain the pipeTo method on scala.concurrent.Future:

    Import this implicit conversion to gain the pipeTo method on scala.concurrent.Future:

    import akka.pattern.pipe
    // requires implicit ExecutionContext, e.g. by importing `context.dispatcher` inside an Actor
    
    Future { doExpensiveCalc() } pipeTo nextActor
    
    or
    
    pipe(someFuture) to nextActor

    The successful result of the future is sent as a message to the recipient, or the failure is sent in a akka.actor.Status.Failure to the recipient.