Package akka.stream.testkit
Class TestSourceStage<T,M>
- java.lang.Object
-
- akka.stream.stage.GraphStageWithMaterializedValue<SourceShape<T>,M>
-
- akka.stream.testkit.TestSourceStage<T,M>
-
- All Implemented Interfaces:
Graph<SourceShape<T>,M>
public class TestSourceStage<T,M> extends GraphStageWithMaterializedValue<SourceShape<T>,M>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.stream.Graph
Graph.GraphMapMatVal<S extends Shape,M>
-
-
Constructor Summary
Constructors Constructor Description TestSourceStage(GraphStageWithMaterializedValue<SourceShape<T>,M> stageUnderTest, TestProbe probe)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,M>
Source<T,M>apply(GraphStageWithMaterializedValue<SourceShape<T>,M> stageUnderTest, TestProbe probe)
Creates a source out of thestageUnderTest
that will inform theprobe
of operator events and callbacks by sending it the various messages found underGraphStageMessages
.scala.Tuple2<GraphStageLogic,M>
createLogicAndMaterializedValue(Attributes inheritedAttributes)
Outlet<T>
out()
SourceShape<T>
shape()
The shape of a graph is all that is externally visible: its inlets and outlets.-
Methods inherited from class akka.stream.stage.GraphStageWithMaterializedValue
createLogicAndMaterializedValue, initialAttributes, traversalBuilder, withAttributes
-
-
-
-
Constructor Detail
-
TestSourceStage
public TestSourceStage(GraphStageWithMaterializedValue<SourceShape<T>,M> stageUnderTest, TestProbe probe)
-
-
Method Detail
-
apply
public static <T,M> Source<T,M> apply(GraphStageWithMaterializedValue<SourceShape<T>,M> stageUnderTest, TestProbe probe)
Creates a source out of thestageUnderTest
that will inform theprobe
of operator events and callbacks by sending it the various messages found underGraphStageMessages
.This allows for creation of a "normal" stream starting with the source while still being able to assert internal events.
-
shape
public SourceShape<T> shape()
Description copied from interface:Graph
The shape of a graph is all that is externally visible: its inlets and outlets.
-
createLogicAndMaterializedValue
public scala.Tuple2<GraphStageLogic,M> createLogicAndMaterializedValue(Attributes inheritedAttributes)
- Specified by:
createLogicAndMaterializedValue
in classGraphStageWithMaterializedValue<SourceShape<T>,M>
-
-