Package org.apache.pekko.stream.scaladsl
Class SourceWithContext$
- java.lang.Object
- 
- org.apache.pekko.stream.scaladsl.SourceWithContext$
 
- 
 public class SourceWithContext$ extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description static SourceWithContext$MODULE$Static reference to the singleton instance of this Scala object.
 - 
Constructor SummaryConstructors Constructor Description SourceWithContext$()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <Out,CtxOut,Mat>
 SourceWithContext<Out,CtxOut,Mat>fromTuples(Source<scala.Tuple2<Out,CtxOut>,Mat> source)Creates a SourceWithContext from a regular source that operates on a tuple of(data, context)elements.<SOut,FOut,Ctx,SMat,FMat,Mat>
 SourceWithContext<scala.Option<FOut>,Ctx,Mat>unsafeOptionalDataVia(SourceWithContext<scala.Option<SOut>,Ctx,SMat> source, Flow<SOut,FOut,FMat> viaFlow, scala.Function2<SMat,FMat,Mat> combine)Creates a SourceWithContext from an existing base SourceWithContext outputting an optional element and applying an additional viaFlow only if the element in the stream is defined.
 
- 
- 
- 
Field Detail- 
MODULE$public static final SourceWithContext$ MODULE$ Static reference to the singleton instance of this Scala object.
 
- 
 - 
Method Detail- 
fromTuplespublic <Out,CtxOut,Mat> SourceWithContext<Out,CtxOut,Mat> fromTuples(Source<scala.Tuple2<Out,CtxOut>,Mat> source) Creates a SourceWithContext from a regular source that operates on a tuple of(data, context)elements.
 - 
unsafeOptionalDataViapublic <SOut,FOut,Ctx,SMat,FMat,Mat> SourceWithContext<scala.Option<FOut>,Ctx,Mat> unsafeOptionalDataVia(SourceWithContext<scala.Option<SOut>,Ctx,SMat> source, Flow<SOut,FOut,FMat> viaFlow, scala.Function2<SMat,FMat,Mat> combine) Creates a SourceWithContext from an existing base SourceWithContext outputting an optional element and applying an additional viaFlow only if the element in the stream is defined.'''Emits when''' the provided viaFlow runs with defined elements '''Backpressures when''' the viaFlow runs for the defined elements and downstream backpressures '''Completes when''' upstream completes '''Cancels when''' downstream cancels - Parameters:
- source- The base source that outputs an optional element
- viaFlow- The flow that gets used if the optional element in is defined. This flow only works on the data portion of flow and ignores the context so this flow *must* not re-order, drop or emit multiple elements for one incoming element
- combine- How to combine the materialized values of source and viaFlow
- Returns:
- a SourceWithContext with the viaFlow applied onto defined elements of the flow. The output value is contained within an Option which indicates whether the original source's element had viaFlow applied.
- Since:
- 1.1.0
 
 
- 
 
-