Class

play.api.libs.streams.impl

PublisherEnumerator

Related Doc: package impl

Permalink

final class PublisherEnumerator[T] extends Enumerator[T]

Adapts a Publisher to an Enumerator.

When an Iteratee is applied to the Enumerator, we adapt the Iteratee into a Subscriber, then subscribe it to the Publisher.

Source
PublisherEnumerator.scala
Linear Supertypes
Enumerator[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PublisherEnumerator
  2. Enumerator
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PublisherEnumerator(pubr: Publisher[T])

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def &>[To](enumeratee: Enumeratee[T, To]): Enumerator[To]

    Permalink

    Compose this Enumerator with an Enumeratee.

    Compose this Enumerator with an Enumeratee. Alias for through

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

    Permalink
    Definition Classes
    AnyRef → Any
  5. def >-[B >: T](other: Enumerator[B]): Enumerator[B]

    Permalink

    Alias for interleave

    Alias for interleave

    Definition Classes
    Enumerator
  6. def >>>(e: Enumerator[T]): Enumerator[T]

    Permalink

    Alias for andThen

    Alias for andThen

    Definition Classes
    Enumerator
  7. def andThen(e: Enumerator[T]): Enumerator[T]

    Permalink

    Sequentially combine this Enumerator with another Enumerator.

    Sequentially combine this Enumerator with another Enumerator. The resulting enumerator will produce both input streams, this one first, then the other. Note: the current implementation will break if the first enumerator produces an Input.EOF.

    Definition Classes
    Enumerator
  8. def apply[A](i: Iteratee[T, A]): Future[Iteratee[T, A]]

    Permalink

    Attaches this Enumerator to an play.api.libs.iteratee.Iteratee, driving the Iteratee to (asynchronously) consume the input.

    Attaches this Enumerator to an play.api.libs.iteratee.Iteratee, driving the Iteratee to (asynchronously) consume the input. The Iteratee may enter its play.api.libs.iteratee.Done or play.api.libs.iteratee.Error state, or it may be left in a play.api.libs.iteratee.Cont state (allowing it to consume more input after that sent by the enumerator).

    If the Iteratee reaches a play.api.libs.iteratee.Done state, it will contain a computed result and the remaining (unconsumed) input.

    Definition Classes
    PublisherEnumeratorEnumerator
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def flatMap[U](f: (T) ⇒ Enumerator[U])(implicit ec: ExecutionContext): Enumerator[U]

    Permalink

    flatmaps the given function f onto parent Enumerator

    flatmaps the given function f onto parent Enumerator

    f

    function to map

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread before being used.

    returns

    enumerator

    Definition Classes
    Enumerator
  15. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def interleave[B >: T](other: Enumerator[B]): Enumerator[B]

    Permalink
    Definition Classes
    Enumerator
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def map[U](f: (T) ⇒ U)(implicit ec: ExecutionContext): Enumerator[U]

    Permalink

    maps the given function f onto parent Enumerator

    maps the given function f onto parent Enumerator

    f

    function to map

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread before being used.

    returns

    enumerator

    Definition Classes
    Enumerator
  20. def mapInput[U](f: (Input[T]) ⇒ Input[U])(implicit ec: ExecutionContext): Enumerator[U]

    Permalink

    Creates an Enumerator, based on this one, with each input transformed by the given function.

    Creates an Enumerator, based on this one, with each input transformed by the given function.

    f

    Used to transform the input.

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread before being used.

    Definition Classes
    Enumerator
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. def onDoneEnumerating(callback: ⇒ Unit)(implicit ec: ExecutionContext): Enumerator[T]

    Permalink

    Creates an Enumerator which calls the given callback when a passed in iteratee has either entered the done state, or if an error is returned.

    Creates an Enumerator which calls the given callback when a passed in iteratee has either entered the done state, or if an error is returned.

    This is equivalent to a finally call, and can be used to clean up any resources used by this enumerator. Note that if the callback throws an exception, then the future returned by the enumerator will be completed with that exception.

    callback

    The callback to call

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread before being used.

    Definition Classes
    Enumerator
  25. def run[A](i: Iteratee[T, A]): Future[A]

    Permalink

    Alias for |>>>; drives the iteratee to consume the enumerator's input, adding an Input.EOF at the end of the input.

    Alias for |>>>; drives the iteratee to consume the enumerator's input, adding an Input.EOF at the end of the input. Returns either a result or an exception.

    Definition Classes
    Enumerator
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def through[To](enumeratee: Enumeratee[T, To]): Enumerator[To]

    Permalink

    Compose this Enumerator with an Enumeratee

    Compose this Enumerator with an Enumeratee

    Definition Classes
    Enumerator
  28. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def |>>[A](i: Iteratee[T, A]): Future[Iteratee[T, A]]

    Permalink

    Alias for apply, produces input driving the given play.api.libs.iteratee.Iteratee to consume it.

    Alias for apply, produces input driving the given play.api.libs.iteratee.Iteratee to consume it.

    Definition Classes
    Enumerator
  33. def |>>>[A](i: Iteratee[T, A]): Future[A]

    Permalink

    Attaches this Enumerator to an play.api.libs.iteratee.Iteratee, driving the Iteratee to (asynchronously) consume the enumerator's input.

    Attaches this Enumerator to an play.api.libs.iteratee.Iteratee, driving the Iteratee to (asynchronously) consume the enumerator's input. If the Iteratee does not reach a play.api.libs.iteratee.Done or play.api.libs.iteratee.Error state when the Enumerator finishes, this method forces one of those states by feeding Input.EOF to the Iteratee.

    If the iteratee is left in a play.api.libs.iteratee.Done state then the promise is completed with the iteratee's result. If the iteratee is left in an play.api.libs.iteratee.Error state, then the promise is completed with a RuntimeException containing the iteratee's error message.

    Unlike apply or |>>, this method does not allow you to access the unconsumed input.

    Definition Classes
    Enumerator
  34. def |>>|[A](i: Iteratee[T, A]): Future[Step[T, A]]

    Permalink

    A variation on apply or |>> which returns the state of the iteratee rather than the iteratee itself.

    A variation on apply or |>> which returns the state of the iteratee rather than the iteratee itself. This can make your code a little shorter.

    Definition Classes
    Enumerator

Inherited from Enumerator[T]

Inherited from AnyRef

Inherited from Any

Ungrouped