public class TestSinkStage<T,M> extends GraphStageWithMaterializedValue<SinkShape<T>,M>
Constructor and Description |
---|
TestSinkStage(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest,
TestProbe probe) |
Modifier and Type | Method and Description |
---|---|
static Graph<S,M> |
addAttributes(Attributes attr) |
static <T,M> Sink<T,M> |
apply(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest,
TestProbe probe)
Creates a sink out of the
stageUnderTest that will inform the probe
of graph stage events and callbacks by sending it the various messages found under
GraphStageMessages . |
static Graph<S,M> |
async() |
scala.Tuple2<GraphStageLogic,M> |
createLogicAndMaterializedValue(Attributes inheritedAttributes) |
Inlet<T> |
in() |
protected static Attributes |
initialAttributes() |
static StreamLayout.Module |
module() |
static Graph<S,M> |
named(java.lang.String name) |
SinkShape<T> |
shape()
The shape of a graph is all that is externally visible: its inlets and outlets.
|
static Graph<S,M> |
withAttributes(Attributes attr) |
initialAttributes, module, withAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttributes, async, named
public TestSinkStage(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest, TestProbe probe)
public static <T,M> Sink<T,M> apply(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest, TestProbe probe)
stageUnderTest
that will inform the probe
of graph stage events and callbacks by sending it the various messages found under
GraphStageMessages
.
This allows for creation of a "normal" stream ending with the sink while still being able to assert internal events.
stageUnderTest
- (undocumented)probe
- (undocumented)public static Graph<S,M> named(java.lang.String name)
public static Graph<S,M> async()
public static Graph<S,M> addAttributes(Attributes attr)
protected static Attributes initialAttributes()
public static final StreamLayout.Module module()
public static final Graph<S,M> withAttributes(Attributes attr)
public SinkShape<T> shape()
Graph
public scala.Tuple2<GraphStageLogic,M> createLogicAndMaterializedValue(Attributes inheritedAttributes)
createLogicAndMaterializedValue
in class GraphStageWithMaterializedValue<SinkShape<T>,M>