akka.io
Interface PipePair<CmdAbove,CmdBelow,EvtAbove,EvtBelow>

All Known Subinterfaces:
SymmetricPipePair<Above,Below>

public interface PipePair<CmdAbove,CmdBelow,EvtAbove,EvtBelow>

Scala API: A pair of pipes, one for commands and one for events, plus a management port. Commands travel from top to bottom, events from bottom to top. All messages which need to be handled “in-order” (e.g. top-down or bottom-up) need to be either events or commands; management messages are processed in no particular order.

Java base classes are provided in the form of AbstractPipePair and AbstractSymmetricPipePair since the Scala function types can be awkward to handle in Java.

See Also:
PipelineStage, AbstractPipePair, AbstractSymmetricPipePair, PipePairFactory

Method Summary
 scala.Function1<CmdAbove,scala.collection.Iterable<scala.util.Either<EvtAbove,CmdBelow>>> commandPipeline()
          The command pipeline transforms injected commands from the upper stage into commands for the stage below, but it can also emit events for the upper stage.
 scala.Function1<EvtBelow,scala.collection.Iterable<scala.util.Either<EvtAbove,CmdBelow>>> eventPipeline()
          The event pipeline transforms injected event from the lower stage into event for the stage above, but it can also emit commands for the stage below.
 scala.PartialFunction<java.lang.Object,scala.collection.Iterable<scala.util.Either<EvtAbove,CmdBelow>>> managementPort()
          The management port allows sending broadcast messages to all stages within this pipeline.
 

Method Detail

commandPipeline

scala.Function1<CmdAbove,scala.collection.Iterable<scala.util.Either<EvtAbove,CmdBelow>>> commandPipeline()
The command pipeline transforms injected commands from the upper stage into commands for the stage below, but it can also emit events for the upper stage. Any number of each can be generated.


eventPipeline

scala.Function1<EvtBelow,scala.collection.Iterable<scala.util.Either<EvtAbove,CmdBelow>>> eventPipeline()
The event pipeline transforms injected event from the lower stage into event for the stage above, but it can also emit commands for the stage below. Any number of each can be generated.


managementPort

scala.PartialFunction<java.lang.Object,scala.collection.Iterable<scala.util.Either<EvtAbove,CmdBelow>>> managementPort()
The management port allows sending broadcast messages to all stages within this pipeline. This can be used to communicate with stages in the middle without having to thread those messages through the surrounding stages. Each stage can generate events and commands in response to a command, and the aggregation of all those is returned.

The default implementation ignores all management commands.