Package akka.stream.scaladsl
Class FlowWithContext<In,CtxIn,Out,CtxOut,Mat>
- java.lang.Object
-
- akka.stream.GraphDelegate<FlowShape<scala.Tuple2<In,CtxIn>,scala.Tuple2<Out,CtxOut>>,Mat>
-
- akka.stream.scaladsl.FlowWithContext<In,CtxIn,Out,CtxOut,Mat>
-
- All Implemented Interfaces:
Graph<FlowShape<scala.Tuple2<In,CtxIn>,scala.Tuple2<Out,CtxOut>>,Mat>
,FlowWithContextOps<Out,CtxOut,Mat>
public final class FlowWithContext<In,CtxIn,Out,CtxOut,Mat> extends GraphDelegate<FlowShape<scala.Tuple2<In,CtxIn>,scala.Tuple2<Out,CtxOut>>,Mat> implements FlowWithContextOps<Out,CtxOut,Mat>
Context-preserving variant ofakka.stream.scaladsl.Flow.withAttributes
.- See Also:
akka.stream.scaladsl.Flow.withAttributes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <In,Ctx>
FlowWithContext<In,Ctx,In,Ctx,NotUsed>apply()
Flow<scala.Tuple2<In,CtxIn>,scala.Tuple2<Out,CtxOut>,Mat>
asFlow()
<JIn extends In,JCtxIn extends CtxIn,JOut,JCtxOut,JMat>
FlowWithContext<JIn,JCtxIn,JOut,JCtxOut,JMat>asJava()
static <In,CtxIn,Out,CtxOut,Mat>
FlowWithContext<In,CtxIn,Out,CtxOut,Mat>fromTuples(Flow<scala.Tuple2<In,CtxIn>,scala.Tuple2<Out,CtxOut>,Mat> flow)
Creates a FlowWithContext from a regular flow that operates on a tuple of(data, context)
elements.<Mat2> FlowWithContext<In,CtxIn,Out,CtxOut,Mat2>
mapMaterializedValue(scala.Function1<Mat,Mat2> f)
Context-preserving variant ofakka.stream.scaladsl.Flow.mapMaterializedValue
.<Out2,Ctx2,Mat2>
FlowWithContext<In,CtxIn,Out2,Ctx2,Mat>via(Graph<FlowShape<scala.Tuple2<Out,CtxOut>,scala.Tuple2<Out2,Ctx2>>,Mat2> viaFlow)
Transform this flow by the regular flow.<Out2,Ctx2,Mat2,Mat3>
FlowWithContext<In,CtxIn,Out2,Ctx2,Mat3>viaMat(Graph<FlowShape<scala.Tuple2<Out,CtxOut>,scala.Tuple2<Out2,Ctx2>>,Mat2> flow, scala.Function2<Mat,Mat2,Mat3> combine)
Transform this flow by the regular flow.FlowWithContext<In,CtxIn,Out,CtxOut,Mat>
withAttributes(Attributes attr)
Context-preserving variant ofakka.stream.scaladsl.Flow.withAttributes
.-
Methods inherited from class akka.stream.GraphDelegate
shape, traversalBuilder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.stream.scaladsl.FlowWithContextOps
collect, filter, filterNot, flow, grouped, log, log$default$2, log$default$3, map, mapAsync, mapConcat, mapContext, sliding, sliding$default$2
-
-
-
-
Method Detail
-
apply
public static <In,Ctx> FlowWithContext<In,Ctx,In,Ctx,NotUsed> apply()
-
fromTuples
public static <In,CtxIn,Out,CtxOut,Mat> FlowWithContext<In,CtxIn,Out,CtxOut,Mat> fromTuples(Flow<scala.Tuple2<In,CtxIn>,scala.Tuple2<Out,CtxOut>,Mat> flow)
Creates a FlowWithContext from a regular flow that operates on a tuple of(data, context)
elements.- Parameters:
flow
- (undocumented)- Returns:
- (undocumented)
-
via
public <Out2,Ctx2,Mat2> FlowWithContext<In,CtxIn,Out2,Ctx2,Mat> via(Graph<FlowShape<scala.Tuple2<Out,CtxOut>,scala.Tuple2<Out2,Ctx2>>,Mat2> viaFlow)
Description copied from interface:FlowWithContextOps
Transform this flow by the regular flow. The given flow must support manual context propagation by taking and producing tuples of (data, context).This can be used as an escape hatch for operations that are not (yet) provided with automatic context propagation here.
- Specified by:
via
in interfaceFlowWithContextOps<In,CtxIn,Out>
- Parameters:
viaFlow
- (undocumented)- Returns:
- (undocumented)
- See Also:
akka.stream.scaladsl.FlowOps.via
-
viaMat
public <Out2,Ctx2,Mat2,Mat3> FlowWithContext<In,CtxIn,Out2,Ctx2,Mat3> viaMat(Graph<FlowShape<scala.Tuple2<Out,CtxOut>,scala.Tuple2<Out2,Ctx2>>,Mat2> flow, scala.Function2<Mat,Mat2,Mat3> combine)
Description copied from interface:FlowWithContextOps
Transform this flow by the regular flow. The given flow must support manual context propagation by taking and producing tuples of (data, context).This can be used as an escape hatch for operations that are not (yet) provided with automatic context propagation here.
The
combine
function is used to compose the materialized values of this flow and that flow into the materialized value of the resulting Flow.- Specified by:
viaMat
in interfaceFlowWithContextOps<In,CtxIn,Out>
- Parameters:
flow
- (undocumented)combine
- (undocumented)- Returns:
- (undocumented)
- See Also:
akka.stream.scaladsl.FlowOpsMat.viaMat
-
withAttributes
public FlowWithContext<In,CtxIn,Out,CtxOut,Mat> withAttributes(Attributes attr)
Context-preserving variant ofakka.stream.scaladsl.Flow.withAttributes
.- Specified by:
withAttributes
in interfaceGraph<In,CtxIn>
- Parameters:
attr
- (undocumented)- Returns:
- (undocumented)
- See Also:
akka.stream.scaladsl.Flow.withAttributes
-
mapMaterializedValue
public <Mat2> FlowWithContext<In,CtxIn,Out,CtxOut,Mat2> mapMaterializedValue(scala.Function1<Mat,Mat2> f)
Context-preserving variant ofakka.stream.scaladsl.Flow.mapMaterializedValue
.- Parameters:
f
- (undocumented)- Returns:
- (undocumented)
- See Also:
akka.stream.scaladsl.Flow.mapMaterializedValue
-
asJava
public <JIn extends In,JCtxIn extends CtxIn,JOut,JCtxOut,JMat> FlowWithContext<JIn,JCtxIn,JOut,JCtxOut,JMat> asJava()
-
-