public interface Stage<In,Out>
Stage implementations are intended to be used with
FlowOps.transform(scala.Function0<akka.stream.stage.Stage<Out, T>>) or
Flow.transform(akka.japi.function.Creator<akka.stream.stage.Stage<Out, U>>) to extend the
Flow API when there
is no specialized operator that performs the transformation.
It is possible to keep state in the concrete
Stage instance with
ordinary instance variables. The
Transformer is executed by an actor and
therefore you do not have to add any additional thread safety or memory
visibility constructs to access the state from the callback methods.