final class FlowWithContext[In, CtxIn, Out, CtxOut, +Mat] extends GraphDelegate[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]

A flow that provides operations which automatically propagate the context of an element. Only a subset of common operations from Flow is supported. As an escape hatch you can use FlowWithContext.via to manually provide the context propagation for otherwise unsupported operations.

An "empty" flow can be created by calling FlowWithContext[Ctx, T].

Source
FlowWithContext.scala
Linear Supertypes
GraphDelegate[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat], Graph[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FlowWithContext
  2. GraphDelegate
  3. Graph
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FlowWithContext(delegate: Flow[Pair[In, CtxIn], Pair[Out, CtxOut], Mat])

Type Members

  1. type Shape = FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]]

    Type-level accessor for the shape parameter of this graph.

    Type-level accessor for the shape parameter of this graph.

    Definition Classes
    Graph

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to any2stringadd[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (FlowWithContext[In, CtxIn, Out, CtxOut, Mat], B)
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to ArrowAssoc[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def addAttributes(attr: Attributes): Graph[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]

    Add the given attributes to this Graph.

    Add the given attributes to this Graph. If the specific attribute was already present on this graph this means the added attribute will be more specific than the existing one. If this Source is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.

    Definition Classes
    Graph
  7. def asFlow(): Flow[Pair[In, CtxIn], Pair[Out, CtxOut], Mat]

    Creates a regular flow of pairs (data, context).

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def asScala: scaladsl.FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
  10. def async(dispatcher: String, inputBufferSize: Int): Graph[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]

    Put an asynchronous boundary around this Graph

    Put an asynchronous boundary around this Graph

    dispatcher

    Run the graph on this dispatcher

    inputBufferSize

    Set the input buffer to this size for the graph

    Definition Classes
    Graph
  11. def async(dispatcher: String): Graph[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]

    Put an asynchronous boundary around this Graph

    Put an asynchronous boundary around this Graph

    dispatcher

    Run the graph on this dispatcher

    Definition Classes
    Graph
  12. def async: Graph[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]

    Put an asynchronous boundary around this Graph

    Put an asynchronous boundary around this Graph

    Definition Classes
    Graph
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  14. def collect[Out2](pf: PartialFunction[Out, Out2]): FlowWithContext[In, CtxIn, Out2, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.collect.

    Context-preserving variant of akka.stream.javadsl.Flow.collect.

    Note, that the context of elements that are filtered out is skipped as well.

    See also

    akka.stream.javadsl.Flow.collect

  15. def ensuring(cond: (FlowWithContext[In, CtxIn, Out, CtxOut, Mat]) ⇒ Boolean, msg: ⇒ Any): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: (FlowWithContext[In, CtxIn, Out, CtxOut, Mat]) ⇒ Boolean): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean, msg: ⇒ Any): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  21. def filter(p: Predicate[Out]): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.filter.

    Context-preserving variant of akka.stream.javadsl.Flow.filter.

    Note, that the context of elements that are filtered out is skipped as well.

    See also

    akka.stream.javadsl.Flow.filter

  22. def filterNot(p: Predicate[Out]): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.filterNot.

    Context-preserving variant of akka.stream.javadsl.Flow.filterNot.

    Note, that the context of elements that are filtered out is skipped as well.

    See also

    akka.stream.javadsl.Flow.filterNot

  23. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to StringFormat[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  24. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. def grouped(n: Int): FlowWithContext[In, CtxIn, List[Out], List[CtxOut], Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.grouped.

    Context-preserving variant of akka.stream.javadsl.Flow.grouped.

    Each output group will be associated with a Seq of corresponding context elements.

    See also

    akka.stream.javadsl.Flow.grouped

  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def log(name: String): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    See also

    akka.stream.javadsl.Flow.log

  29. def log(name: String, log: LoggingAdapter): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    See also

    akka.stream.javadsl.Flow.log

  30. def log(name: String, extract: Function[Out, Any]): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    See also

    akka.stream.javadsl.Flow.log

  31. def log(name: String, extract: Function[Out, Any], log: LoggingAdapter): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    Context-preserving variant of akka.stream.javadsl.Flow.log.

    See also

    akka.stream.javadsl.Flow.log

  32. def map[Out2](f: Function[Out, Out2]): FlowWithContext[In, CtxIn, Out2, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.map.

    Context-preserving variant of akka.stream.javadsl.Flow.map.

    See also

    akka.stream.javadsl.Flow.map

  33. def mapAsync[Out2](parallelism: Int, f: Function[Out, CompletionStage[Out2]]): FlowWithContext[In, CtxIn, Out2, CtxOut, Mat]
  34. def mapConcat[Out2](f: Function[Out, _ <: Iterable[Out2]]): FlowWithContext[In, CtxIn, Out2, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.mapConcat.

    Context-preserving variant of akka.stream.javadsl.Flow.mapConcat.

    The context of the input element will be associated with each of the output elements calculated from this input element.

    Example:

    def dup(element: String) = Seq(element, element)

    Input:

    ("a", 1) ("b", 2)

    inputElements.mapConcat(dup)

    Output:

    ("a", 1) ("a", 1) ("b", 2) ("b", 2)

    See also

    akka.stream.javadsl.Flow.mapConcat

  35. def mapContext[CtxOut2](extractContext: Function[CtxOut, CtxOut2]): FlowWithContext[In, CtxIn, Out, CtxOut2, Mat]

    Apply the given function to each context element (leaving the data elements unchanged).

  36. def mapError(pf: PartialFunction[Throwable, Throwable]): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.mapError.

  37. def mapMaterializedValue[Mat2](f: Function[Mat, Mat2]): FlowWithContext[In, CtxIn, Out, CtxOut, Mat2]

    Context-preserving variant of akka.stream.javadsl.Flow.mapMaterializedValue.

  38. def named(name: String): Graph[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]
    Definition Classes
    Graph
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  42. final def shape: FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]]

    The shape of a graph is all that is externally visible: its inlets and outlets.

    The shape of a graph is all that is externally visible: its inlets and outlets.

    Definition Classes
    GraphDelegate → Graph
  43. def sliding(n: Int, step: Int = 1): FlowWithContext[In, CtxIn, List[Out], List[CtxOut], Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.sliding.

    Context-preserving variant of akka.stream.javadsl.Flow.sliding.

    Each output group will be associated with a Seq of corresponding context elements.

    See also

    akka.stream.javadsl.Flow.sliding

  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. def via[Out2, CtxOut2, Mat2](viaFlow: Graph[FlowShape[Pair[Out, CtxOut], Pair[Out2, CtxOut2]], Mat2]): FlowWithContext[In, CtxIn, Out2, CtxOut2, Mat]

    Transform this flow by the regular flow.

    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.

    See also

    akka.stream.javadsl.Flow.via

  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  49. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. def withAttributes(attr: Attributes): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]

    Context-preserving variant of akka.stream.javadsl.Flow.withAttributes.

  51. def [B](y: B): (FlowWithContext[In, CtxIn, Out, CtxOut, Mat], B)
    Implicit
    This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to ArrowAssoc[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from GraphDelegate[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]

Inherited from Graph[FlowShape[Pair[In, CtxIn], Pair[Out, CtxOut]], Mat]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to any2stringadd[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]]

Inherited by implicit conversion StringFormat from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to StringFormat[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]]

Inherited by implicit conversion Ensuring from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]]

Inherited by implicit conversion ArrowAssoc from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to ArrowAssoc[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]]

Ungrouped