!str #15236 Replace Transformer with Stage
* replace all existing Transformer with Stage (PushPullStage) * use Flow[ByteString, ByteString] as encoder/decoder transformer in http * use the IteratorInterpreter for strict if possible * emit then become * emit then finish * termination emits * FlowTransformerSpec * rework types to work with Java API * rename and move things * add scaladoc
This commit is contained in:
parent
299854905b
commit
a82f266367
61 changed files with 1478 additions and 1518 deletions
|
|
@ -3,10 +3,11 @@
|
|||
*/
|
||||
package akka.stream.scaladsl
|
||||
|
||||
import akka.stream.{ OverflowStrategy, Transformer }
|
||||
import akka.stream.OverflowStrategy
|
||||
import akka.stream.FlowMaterializer
|
||||
import akka.stream.testkit.AkkaSpec
|
||||
import akka.stream.testkit.StreamTestKit.{ PublisherProbe, SubscriberProbe }
|
||||
import akka.stream.stage._
|
||||
|
||||
object FlowGraphCompileSpec {
|
||||
class Fruit
|
||||
|
|
@ -18,9 +19,10 @@ class FlowGraphCompileSpec extends AkkaSpec {
|
|||
|
||||
implicit val mat = FlowMaterializer()
|
||||
|
||||
def op[In, Out]: () ⇒ Transformer[In, Out] = { () ⇒
|
||||
new Transformer[In, Out] {
|
||||
override def onNext(elem: In) = List(elem.asInstanceOf[Out])
|
||||
def op[In, Out]: () ⇒ PushStage[In, Out] = { () ⇒
|
||||
new PushStage[In, Out] {
|
||||
override def onPush(elem: In, ctx: Context[Out]): Directive =
|
||||
ctx.push(elem.asInstanceOf[Out])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue