akka.stream.javadsl

Source

object Source

Java API

Source
Source.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Source
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def actorPublisher[T](props: Props): Source[T, ActorRef]

    Creates a Source that is materialized to an akka.actor.ActorRef which points to an Actor created according to the passed in akka.actor.Props.

    Creates a Source that is materialized to an akka.actor.ActorRef which points to an Actor created according to the passed in akka.actor.Props. Actor created by the props should be akka.stream.actor.ActorPublisher.

  7. def actorRef[T](bufferSize: Int, overflowStrategy: OverflowStrategy): Source[T, ActorRef]

    Creates a Source that is materialized as an akka.actor.ActorRef.

    Creates a Source that is materialized as an akka.actor.ActorRef. Messages sent to this actor will be emitted to the stream if there is demand from downstream, otherwise they will be buffered until request for demand is received.

    Depending on the defined akka.stream.OverflowStrategy it might drop elements if there is no space available in the buffer.

    The strategy akka.stream.OverflowStrategy.backpressure is not supported, and an IllegalArgument("Backpressure overflowStrategy not supported") will be thrown if it is passed as argument.

    The buffer can be disabled by using bufferSize of 0 and then received messages are dropped if there is no demand from downstream. When bufferSize is 0 the overflowStrategy does not matter.

    The stream can be completed successfully by sending akka.actor.PoisonPill or akka.actor.Status.Success to the actor reference.

    The stream can be completed with failure by sending akka.actor.Status.Failure to the actor reference.

    The actor will be stopped when the stream is completed, failed or cancelled from downstream, i.e. you can watch it to get notified when that happens.

    bufferSize

    The size of the buffer in element count

    overflowStrategy

    Strategy that is used when incoming elements cannot fit inside the buffer

  8. def adapt[O, M](source: scaladsl.Source[O, M]): Source[O, M]

    Adapt scaladsl.Source for use within JavaDSL

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def concat[T, M1, M2](first: Graph[SourceShape[T], M1], second: Graph[SourceShape[T], M2]): Source[T, (M1, M2)]

    Concatenates two sources so that the first element emitted by the second source is emitted after the last element of the first source.

  12. def concatMat[T, M1, M2, M3](first: Graph[SourceShape[T], M1], second: Graph[SourceShape[T], M2], combine: Function2[M1, M2, M3]): Source[T, M3]

    Concatenates two sources so that the first element emitted by the second source is emitted after the last element of the first source.

  13. def empty[O](): Source[O, Unit]

    Create a Source with no elements, i.

    Create a Source with no elements, i.e. an empty stream that is completed immediately for every connected Sink.

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. val factory: SourceCreate

  17. def failed[T](cause: Throwable): Source[T, Unit]

    Create a Source that immediately ends the stream with the cause failure to every connected Sink.

  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def from[O](initialDelay: FiniteDuration, interval: FiniteDuration, tick: O): Source[O, Cancellable]

    Elements are emitted periodically with the specified interval.

    Elements are emitted periodically with the specified interval. The tick element will be delivered to downstream consumers that has requested any elements. If a consumer has not requested any elements at the point in time when the tick element is produced it will not receive that tick element later. It will receive new tick elements as soon as it has requested more elements.

  20. def from[O](future: Future[O]): Source[O, Unit]

    Start a new Source from the given Future.

    Start a new Source from the given Future. The stream will consist of one element when the Future is completed with a successful value, which may happen before or after materializing the Flow. The stream terminates with a failure if the Future is completed with a failure.

  21. def from[O](iterable: Iterable[O]): Source[O, Unit]

    Helper to create Source from Iterable.

    Helper to create Source from Iterable. Example usage:

    List<Integer> data = new ArrayList<Integer>();
    data.add(1);
    data.add(2);
    data.add(3);
    Source.fom(data);

    Starts a new Source from the given Iterable. This is like starting from an Iterator, but every Subscriber directly attached to the Publisher of this stream will see an individual flow of elements (always starting from the beginning) regardless of when they subscribed.

    Make sure that the Iterable is immutable or at least not modified after being used as a Source. Otherwise the stream may fail with ConcurrentModificationException or other more subtle errors may occur.

  22. def from[O](publisher: Publisher[O]): Source[O, Unit]

    Helper to create Source from Publisher.

    Helper to create Source from Publisher.

    Construct a transformation starting with given publisher. The transformation steps are executed by a series of org.reactivestreams.Processor instances that mediate the flow of elements downstream and the propagation of back-pressure upstream.

  23. def fromIterator[O](f: Creator[Iterator[O]]): Source[O, Unit]

    Helper to create Source from Iterator.

    Helper to create Source from Iterator. Example usage:

    List<Integer> data = new ArrayList<Integer>();
    data.add(1);
    data.add(2);
    data.add(3);
    Source.from(() -> data.iterator());

    Start a new Source from the given Iterator. The produced stream of elements will continue until the iterator runs empty or fails during evaluation of the next() method. Elements are pulled out of the iterator in accordance with the demand coming from the downstream transformation steps.

  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def lazyEmpty[T](): Source[T, Promise[Unit]]

    Create a Source with no elements, which does not complete its downstream, until externally triggered to do so.

    Create a Source with no elements, which does not complete its downstream, until externally triggered to do so.

    It materializes a scala.concurrent.Promise which will be completed when the downstream stage of this source cancels. This promise can also be used to externally trigger completion, which the source then signalls to its downstream.

  28. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  31. def repeat[T](element: T): Source[T, Unit]

    Create a Source that will continually emit the given element.

  32. def single[T](element: T): Source[T, Unit]

    Create a Source with one element.

    Create a Source with one element. Every connected Sink of this stream will see an individual stream consisting of one element.

  33. def subscriber[T](): Source[T, Subscriber[T]]

    Creates a Source that is materialized as a org.reactivestreams.Subscriber

  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def wrap[T, M](g: Graph[SourceShape[T], M]): Source[T, M]

    A graph with the shape of a source logically is a source, this method makes it so also in type.

Inherited from AnyRef

Inherited from Any

Ungrouped