play.api.libs.streams

Streams

Related Doc: package streams

object Streams

Methods to adapt Futures, Promises, Iteratees and Enumerators to and from Reactive Streams' Publishers and Subscribers.

Source
Streams.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Streams
  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: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def enumeratorToPublisher[T](enum: Enumerator[T], emptyElement: Option[T] = None): Publisher[T]

    Adapt an Enumerator to a Publisher.

    Adapt an Enumerator to a Publisher. Each Subscriber will be adapted to an Iteratee and applied to the Enumerator. Input of type Input.El will result in calls to onNext. Input of type Input.EOF will call onComplete and end the Subscription.

    If emptyElement is None then Input of type Input.Empty will be ignored. If it is set to Some(x) then it will call onNext with the value x.

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

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

    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def futureToPublisher[T](fut: Future[T]): Publisher[T]

    Adapt a Future into a Publisher.

    Adapt a Future into a Publisher. For a successful Future the Publisher will emit a single element with the value. For a failed Future the Publisher will emit an onError event.

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

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

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

    Definition Classes
    Any
  14. def iterateeDoneToPublisher[T, U](iter: Iteratee[T, U]): Publisher[U]

    Adapt an Iteratee to a Publisher, publishing its Done value.

    Adapt an Iteratee to a Publisher, publishing its Done value. If the iteratee is *not* Done then an exception is published.

    This method is similar in its effect to Iteratee.run, which extracts the final value from an Iteratee. However, unlike Iteratee.run, this method will not feed an EOF input to the Iteratee.

  15. def iterateeToProcessor[T, U](iter: Iteratee[T, U]): Processor[T, U]

    Adapt an Iteratee to a Processor, which consumes input and then yields the iteratee's Done value.

    Adapt an Iteratee to a Processor, which consumes input and then yields the iteratee's Done value. It uses iterateeToSubscriber and iterateeDoneToPublisher to create each end of the Processor.

  16. def iterateeToSubscriber[T, U](iter: Iteratee[T, U]): (Subscriber[T], Iteratee[T, U])

    Adapt an Iteratee to a Subscriber and a result Iteratee.

    Adapt an Iteratee to a Subscriber and a result Iteratee.

    The Subscriber requests elements one-by-one and feeds them to each Iteratee Cont step. When the Iteratee step is Done or Error, the Subscription is cancelled.

    The result iteratee will be fulfilled when either the Iteratee or the Subscriber subscription completes. The result Iteratee may be in a Cont, Done or Error state, or a fourth state that will yield errors or failed Futures when its methods are called.

    Calls to onNext send an Input.El to the iteratee and calls to onComplete send an Input.EOF. If onError is called then the iteratee enters an invalid state.

    If the Iteratee is in a Done or Error state then it will cancel the Subscription as soon as possible, but it may still receive calls to onError or onComplete. These calls are ignored. Be careful because this means that it is possible for the Subscriber to "consume" events, even if the Iteratee doesn't.

  17. def join[T, U](subr: Subscriber[T], pubr: Publisher[U]): Processor[T, U]

    Join a Subscriber and Publisher together to make a Processor.

    Join a Subscriber and Publisher together to make a Processor. The Processor delegates its Subscriber methods to the Subscriber and its Publisher methods to the Publisher. The Processor otherwise does nothing.

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

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

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

    Definition Classes
    AnyRef
  21. def promiseToProcessor[T](prom: Promise[T]): Processor[T, T]

    Adapt a Promise into a Processor, creating an Processor that consumes a single element and publishes it.

    Adapt a Promise into a Processor, creating an Processor that consumes a single element and publishes it. The Subscriber end of the the Processor is created with promiseToSubscriber. The Publisher end of the Processor is created with futureToPublisher.

  22. def promiseToSubscriber[T](prom: Promise[T]): Subscriber[T]

    Adapt a Promise into a Subscriber.

    Adapt a Promise into a Subscriber. The Subscriber accepts a single value which is used to complete the Promise. If the Subscriber's onError method is called then the Promise is completed with a failure.

    A call to onError after onNext is called will be ignored.

  23. def publisherToEnumerator[T](pubr: Publisher[T]): Enumerator[T]

    Adapt a Publisher to an Enumerator.

    Adapt a Publisher to an Enumerator. This is achieved by adapting any Iteratees into Subscribers using the iterateeToSubscriber method.

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

    Definition Classes
    AnyRef
  25. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped