Packages

p

akka.stream

javadsl

package javadsl

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. javadsl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed abstract final class AsPublisher extends Enum[AsPublisher]
  2. final class BidiFlow[I1, O1, I2, O2, Mat] extends Graph[BidiShape[I1, O1, I2, O2], Mat]
  3. final class Flow[In, Out, Mat] extends Graph[FlowShape[In, Out], Mat]

    Create a Flow which can process elements of type T.

  4. final class FlowWithContext[-CtxIn, -In, +CtxOut, +Out, +Mat] extends GraphDelegate[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat]

    A flow that provides operations which automatically propagate the context of an element.

    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].

    API MAY CHANGE

    Annotations
    @ApiMayChange()
  5. sealed abstract final class FramingTruncation extends Enum[FramingTruncation]

    Determines mode in which Framing operates.

  6. abstract class RunnableGraph[+Mat] extends Graph[ClosedShape, Mat]

    Java API

    Java API

    Flow with attached input and output, can be executed.

  7. final class Sink[In, Mat] extends Graph[SinkShape[In], Mat]

    Java API

    Java API

    A Sink is a set of stream processing steps that has one open input. Can be used as a Subscriber

  8. trait SinkQueue[T] extends AnyRef

    Trait allows to have the queue as a sink for some stream.

    Trait allows to have the queue as a sink for some stream. "SinkQueue" pulls data from stream with backpressure mechanism.

  9. trait SinkQueueWithCancel[T] extends SinkQueue[T]

    This trait adds cancel support to SinkQueue.

  10. final class Source[Out, Mat] extends Graph[SourceShape[Out], Mat]

    Java API

    Java API

    A Source is a set of stream processing steps that has one open output and an attached input. Can be used as a Publisher

  11. trait SourceQueue[T] extends AnyRef

    This trait allows to have the queue as a data source for some stream.

  12. trait SourceQueueWithComplete[T] extends SourceQueue[T]

    This trait adds completion support to SourceQueue.

  13. final class SourceWithContext[+Ctx, +Out, +Mat] extends GraphDelegate[SourceShape[(Out, Ctx)], Mat]

    A source that provides operations which automatically propagate the context of an element.

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

    Can be created by calling Source.startContextPropagation()

    API MAY CHANGE

    Annotations
    @ApiMayChange()
  14. class SubFlow[In, Out, Mat] extends AnyRef

    A “stream of streams” sub-flow of data elements, e.g.

    A “stream of streams” sub-flow of data elements, e.g. produced by groupBy. SubFlows cannot contribute to the super-flow’s materialized value since they are materialized later, during the runtime of the flow graph processing.

  15. class SubSource[Out, Mat] extends AnyRef

    A “stream of streams” sub-flow of data elements, e.g.

    A “stream of streams” sub-flow of data elements, e.g. produced by groupBy. SubFlows cannot contribute to the super-flow’s materialized value since they are materialized later, during the runtime of the flow graph processing.

  16. class Tcp extends Extension

Value Members

  1. def combinerToScala[M1, M2, M](f: Function2[M1, M2, M]): (M1, M2) ⇒ M
  2. object Balance

    Fan-out the stream to several streams.

    Fan-out the stream to several streams. Each upstream element is emitted to the first available downstream consumer. It will not shutdown until the subscriptions for at least two downstream subscribers have been established.

    Emits when any of the outputs stops backpressuring; emits the element to the first available output

    Backpressures when all of the outputs backpressure

    Completes when upstream completes

    Cancels when If eagerCancel is enabled: when any downstream cancels; otherwise: when all downstreams cancel

  3. object BidiFlow
  4. object Broadcast

    Fan-out the stream to several streams.

    Fan-out the stream to several streams. emitting each incoming upstream element to all downstream consumers. It will not shutdown until the subscriptions for at least two downstream subscribers have been established.

    Emits when all of the outputs stops backpressuring and there is an input element available

    Backpressures when any of the outputs backpressure

    Completes when upstream completes

    Cancels when If eagerCancel is enabled: when any downstream cancels; otherwise: when all downstreams cancel

  5. object BroadcastHub

    A BroadcastHub is a special streaming hub that is able to broadcast streamed elements to a dynamic set of consumers.

    A BroadcastHub is a special streaming hub that is able to broadcast streamed elements to a dynamic set of consumers. It consists of two parts, a Sink and a Source. The Sink broadcasts elements from a producer to the actually live consumers it has. Once the producer has been materialized, the Sink it feeds into returns a materialized value which is the corresponding Source. This Source can be materialized an arbitrary number of times, where each of the new materializations will receive their elements from the original Sink.

  6. object Compression
  7. object Concat

    Takes two streams and outputs an output stream formed from the two input streams by consuming one stream first emitting all of its elements, then consuming the second stream emitting all of its elements.

    Takes two streams and outputs an output stream formed from the two input streams by consuming one stream first emitting all of its elements, then consuming the second stream emitting all of its elements.

    Emits when the current stream has an element available; if the current input completes, it tries the next one

    Backpressures when downstream backpressures

    Completes when all upstreams complete

    Cancels when downstream cancels

  8. object CoupledTerminationFlow

    Allows coupling termination (cancellation, completion, erroring) of Sinks and Sources while creating a Flow them them.

    Allows coupling termination (cancellation, completion, erroring) of Sinks and Sources while creating a Flow them them. Similar to Flow.fromSinkAndSource however that API does not connect the completion signals of the wrapped operators.

  9. object FileIO

    Java API: Factories to create sinks and sources from files

  10. object Flow
  11. object FlowWithContext

    API MAY CHANGE

    API MAY CHANGE

    Annotations
    @ApiMayChange()
  12. object Framing
  13. object GraphDSL extends GraphCreate
  14. object JsonFraming

    Provides JSON framing operators that can separate valid JSON objects from incoming akka.util.ByteString objects.

  15. object Keep
  16. object Merge

    Merge several streams, taking elements as they arrive from input streams (picking randomly when several have elements ready).

    Merge several streams, taking elements as they arrive from input streams (picking randomly when several have elements ready).

    Emits when one of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when all upstreams complete (eagerComplete=false) or one upstream completes (eagerComplete=true)

    Cancels when downstream cancels

  17. object MergeHub

    A MergeHub is a special streaming hub that is able to collect streamed elements from a dynamic set of producers.

    A MergeHub is a special streaming hub that is able to collect streamed elements from a dynamic set of producers. It consists of two parts, a Source and a Sink. The Source streams the element to a consumer from its merged inputs. Once the consumer has been materialized, the Source returns a materialized value which is the corresponding Sink. This Sink can then be materialized arbitrary many times, where each of the new materializations will feed its consumed elements to the original Source.

  18. object MergeLatest

    MergeLatest joins elements from N input streams into stream of lists of size N.

    MergeLatest joins elements from N input streams into stream of lists of size N. i-th element in list is the latest emitted element from i-th input stream. MergeLatest emits list for each element emitted from some input stream, but only after each stream emitted at least one element

    Emits when element is available from some input and each input emits at least one element from stream start

    Completes when all upstreams complete (eagerClose=false) or one upstream completes (eagerClose=true)

    Cancels when downstream cancels

  19. object MergePreferred

    Merge several streams, taking elements as they arrive from input streams (picking from preferred when several have elements ready).

    Merge several streams, taking elements as they arrive from input streams (picking from preferred when several have elements ready).

    Emits when one of the inputs has an element available, preferring a specified input if multiple have elements available

    Backpressures when downstream backpressures

    Completes when all upstreams complete (eagerComplete=false) or one upstream completes (eagerComplete=true)

    Cancels when downstream cancels

  20. object MergePrioritized

    Merge several streams, taking elements as they arrive from input streams (picking from prioritized once when several have elements ready).

    Merge several streams, taking elements as they arrive from input streams (picking from prioritized once when several have elements ready).

    A MergePrioritized has one out port, one or more input port with their priorities.

    Emits when one of the inputs has an element available, preferring a input based on its priority if multiple have elements available

    Backpressures when downstream backpressures

    Completes when all upstreams complete (eagerComplete=false) or one upstream completes (eagerComplete=true), default value is false

    Cancels when downstream cancels

    A Broadcast has one in port and 2 or more out ports.

  21. object Partition

    Fan-out the stream to several streams.

    Fan-out the stream to several streams. emitting an incoming upstream element to one downstream consumer according to the partitioner function applied to the element

    Emits when all of the outputs stops backpressuring and there is an input element available

    Backpressures when one of the outputs backpressure

    Completes when upstream completes

    Cancels when when any (eagerCancel=true) or all (eagerCancel=false) of the downstreams cancel

  22. object PartitionHub

    A PartitionHub is a special streaming hub that is able to route streamed elements to a dynamic set of consumers.

    A PartitionHub is a special streaming hub that is able to route streamed elements to a dynamic set of consumers. It consists of two parts, a Sink and a Source. The Sink e elements from a producer to the actually live consumers it has. The selection of consumer is done with a function. Each element can be routed to only one consumer. Once the producer has been materialized, the Sink it feeds into returns a materialized value which is the corresponding Source. This Source can be materialized an arbitrary number of times, where each of the new materializations will receive their elements from the original Sink.

  23. object RestartFlow

    A RestartFlow wraps a Flow that gets restarted when it completes or fails.

    A RestartFlow wraps a Flow that gets restarted when it completes or fails.

    They are useful for graphs that need to run for longer than the Flow can necessarily guarantee it will, for example, for Flow streams that depend on a remote server that may crash or become partitioned. The RestartFlow ensures that the graph can continue running while the Flow restarts.

  24. object RestartSink

    A RestartSink wraps a Sink that gets restarted when it completes or fails.

    A RestartSink wraps a Sink that gets restarted when it completes or fails.

    They are useful for graphs that need to run for longer than the Sink can necessarily guarantee it will, for example, for Sink streams that depend on a remote server that may crash or become partitioned. The RestartSink ensures that the graph can continue running while the Sink restarts.

  25. object RestartSource

    A RestartSource wraps a Source that gets restarted when it completes or fails.

    A RestartSource wraps a Source that gets restarted when it completes or fails.

    They are useful for graphs that need to run for longer than the Source can necessarily guarantee it will, for example, for Source streams that depend on a remote server that may crash or become partitioned. The RestartSource ensures that the graph can continue running while the Source restarts.

  26. object RunnableGraph
  27. object Sink

    Java API

  28. object Source

    Java API

  29. object StreamConverters

    Converters for interacting with the blocking java.io streams APIs and Java 8 Streams

  30. object StreamRefs

    API MAY CHANGE: The functionality of stream refs is working, however it is expected that the materialized value will eventually be able to remove the Future wrapping the stream references.

    API MAY CHANGE: The functionality of stream refs is working, however it is expected that the materialized value will eventually be able to remove the Future wrapping the stream references. For this reason the API is now marked as API may change. See ticket https://github.com/akka/akka/issues/24372 for more details.

    Factories for creating stream refs.

    Annotations
    @ApiMayChange()
  31. object SubFlow
  32. object SubSource

    * Upcast a stream of elements to a stream of supertypes of that element.

    * Upcast a stream of elements to a stream of supertypes of that element. Useful in combination with fan-in operators where you do not want to pay the cost of casting each element in a map.

  33. object TLS

    Stream cipher support based upon JSSE.

    Stream cipher support based upon JSSE.

    The underlying SSLEngine has four ports: plaintext input/output and ciphertext input/output. These are modeled as a akka.stream.BidiShape element for use in stream topologies, where the plaintext ports are on the left hand side of the shape and the ciphertext ports on the right hand side.

    Configuring JSSE is a rather complex topic, please refer to the JDK platform documentation or the excellent user guide that is part of the Play Framework documentation. The philosophy of this integration into Akka Streams is to expose all knobs and dials to client code and therefore not limit the configuration possibilities. In particular the client code will have to provide the SSLContext from which the SSLEngine is then created. Handshake parameters are set using NegotiateNewSession messages, the settings for the initial handshake need to be provided up front using the same class; please refer to the method documentation below.

    IMPORTANT NOTE

    The TLS specification does not permit half-closing of the user data session that it transports—to be precise a half-close will always promptly lead to a full close. This means that canceling the plaintext output or completing the plaintext input of the SslTls operator will lead to full termination of the secure connection without regard to whether bytes are remaining to be sent or received, respectively. Especially for a client the common idiom of attaching a finite Source to the plaintext input and transforming the plaintext response bytes coming out will not work out of the box due to early termination of the connection. For this reason there is a parameter that determines whether the SslTls operator shall ignore completion and/or cancellation events, and the default is to ignore completion (in view of the client–server scenario). In order to terminate the connection the client will then need to cancel the plaintext output as soon as all expected bytes have been received. When ignoring both types of events the operator will shut down once both events have been received. See also TLSClosing.

  34. object TLSPlacebo

    This object holds simple wrapping akka.stream.scaladsl.BidiFlow implementations that can be used instead of TLS when no encryption is desired.

    This object holds simple wrapping akka.stream.scaladsl.BidiFlow implementations that can be used instead of TLS when no encryption is desired. The flows will just adapt the message protocol by wrapping into SessionBytes and unwrapping SendBytes.

  35. object Tcp extends ExtensionId[Tcp] with ExtensionIdProvider
  36. object Unzip

    Takes a stream of pair elements and splits each pair to two output streams.

    Takes a stream of pair elements and splits each pair to two output streams.

    An Unzip has one in port and one left and one right output port.

    Emits when all of the outputs stops backpressuring and there is an input element available

    Backpressures when any of the outputs backpressures

    Completes when upstream completes

    Cancels when any downstream cancels

  37. object UnzipWith

    Split one stream into several streams using a splitting function.

    Split one stream into several streams using a splitting function.

    Emits when all of the outputs stops backpressuring and there is an input element available

    Backpressures when any of the outputs backpressures

    Completes when upstream completes

    Cancels when any downstream cancels

  38. object Zip

    Combine the elements of 2 streams into a stream of tuples.

    Combine the elements of 2 streams into a stream of tuples.

    A Zip has a left and a right input port and one out port

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

  39. object ZipLatest

    Combine the elements of 2 streams into a stream of tuples, picking always the latest element of each.

    Combine the elements of 2 streams into a stream of tuples, picking always the latest element of each.

    A Zip has a left and a right input port and one out port

    Emits when all of the inputs have at least an element available, and then each time an element becomes available on either of the inputs

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

  40. object ZipLatestWith

    Combine the elements of multiple streams into a stream of combined elements using a combiner function, picking always the latest of the elements of each source.

    Combine the elements of multiple streams into a stream of combined elements using a combiner function, picking always the latest of the elements of each source.

    No element is emitted until at least one element from each Source becomes available. Whenever a new element appears, the zipping function is invoked with a tuple containing the new element and the other last seen elements.

    Emits when all of the inputs have at least an element available, and then each time an element becomes available on either of the inputs

    Backpressures when downstream backpressures

    Completes when any of the upstreams completes

    Cancels when downstream cancels

  41. object ZipN

    Combine the elements of multiple streams into a stream of lists.

    Combine the elements of multiple streams into a stream of lists.

    A ZipN has a n input ports and one out port

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

  42. object ZipWith

    Combine the elements of multiple streams into a stream of combined elements using a combiner function.

    Combine the elements of multiple streams into a stream of combined elements using a combiner function.

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

  43. object ZipWithN

    Combine the elements of multiple streams into a stream of lists using a combiner function.

    Combine the elements of multiple streams into a stream of lists using a combiner function.

    A ZipWithN has a n input ports and one out port

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

Inherited from AnyRef

Inherited from Any

Ungrouped