Package org.apache.pekko.pattern
Interface PipeToSupport
public interface PipeToSupport
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescription<T> PipeToSupport.PipeableFuture<T>pipe(scala.concurrent.Future<T> future, scala.concurrent.ExecutionContext executionContext) Import this implicit conversion to gain thepipeTomethod onFuture:pipeCompletionStage(CompletionStage<T> future, scala.concurrent.ExecutionContext executionContext) Import this implicit conversion to gain thepipeTomethod onFuture:
-
Method Details
-
pipe
<T> PipeToSupport.PipeableFuture<T> pipe(scala.concurrent.Future<T> future, scala.concurrent.ExecutionContext executionContext) Import this implicit conversion to gain thepipeTomethod onFuture:import org.apache.pekko.pattern.pipe // requires implicit ExecutionContext, e.g. by importing `context.dispatcher` inside an Actor Future { doExpensiveCalc() } pipeTo nextActor or pipe(someFuture) to nextActorThe successful result of the future is sent as a message to the recipient, or the failure is sent in a
pekko.actor.Status.Failureto the recipient. -
pipeCompletionStage
<T> PipeToSupport.PipeableCompletionStage<T> pipeCompletionStage(CompletionStage<T> future, scala.concurrent.ExecutionContext executionContext) Import this implicit conversion to gain thepipeTomethod onFuture:import org.apache.pekko.pattern.pipe // requires implicit ExecutionContext, e.g. by importing `context.dispatcher` inside an Actor Future { doExpensiveCalc() } pipeTo nextActor or pipe(someFuture) to nextActorThe successful result of the future is sent as a message to the recipient, or the failure is sent in a
pekko.actor.Status.Failureto the recipient.
-