play.api.libs.iteratee

Enumeratee

object Enumeratee

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

Type Members

  1. trait CheckDone[From, To] extends Enumeratee[From, To]

    An Enumeratee that checks to ensure that the passed in Iteratee is not done before doing any work.

  2. trait Collect[From] extends AnyRef

    A partially-applied function returned by the collect method.

  3. trait Grouped[From] extends AnyRef

    A partially-applied function returned by the grouped method.

  4. trait Map[E] extends AnyRef

    A partially-applied function returned by the map method.

  5. trait MapConcat[From] extends AnyRef

    A partially-applied function returned by the mapConcat method.

  6. trait MapConcatInput[From] extends AnyRef

    A partially-applied function returned by the mapConcatInput method.

  7. trait MapFlatten[From] extends AnyRef

    A partially-applied function returned by the mapFlatten method.

  8. trait MapInput[From] extends AnyRef

    A partially-applied function returned by the mapInput method.

  9. trait MapInputFlatten[From] extends AnyRef

    A partially-applied function returned by the mapInputFlatten method.

  10. trait MapInputM[From] extends AnyRef

    A partially-applied function returned by the mapInputM method.

  11. trait MapM[E] extends AnyRef

    A partially-applied function returned by the mapM method.

  12. trait ScanLeft[From] extends AnyRef

    A partially-applied function returned by the scanLeft method.

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 breakE[E](p: (E) ⇒ Boolean)(implicit ec: ExecutionContext): Enumeratee[E, E] { val pec: scala.concurrent.ExecutionContext }

    Create an Enumeratee that passes input through until a predicate is satisfied.

    Create an Enumeratee that passes input through until a predicate is satisfied. Once the predicate is satisfied, no more input is passed through.

    ec

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

  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def collect[From]: Collect[From]

    Create an Enumeratee that both filters and transforms its input.

    Create an Enumeratee that both filters and transforms its input. The input is transformed by the given PartialFunction. If the PartialFunction isn't defined for an input element then that element is discarded.

  8. def drop[E](count: Int): Enumeratee[E, E]

  9. def dropWhile[E](p: (E) ⇒ Boolean)(implicit ec: ExecutionContext): Enumeratee[E, E]

    Create an Enumeratee that drops input until a predicate is satisfied.

    Create an Enumeratee that drops input until a predicate is satisfied.

    ec

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

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

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

    Definition Classes
    AnyRef → Any
  12. def filter[E](predicate: (E) ⇒ Boolean)(implicit ec: ExecutionContext): Enumeratee[E, E]

    Create an Enumeratee that filters the inputs using the given predicate

    Create an Enumeratee that filters the inputs using the given predicate

    predicate

    A function to filter the input elements.

    ec

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

  13. def filterNot[E](predicate: (E) ⇒ Boolean)(implicit ec: ExecutionContext): Enumeratee[E, E]

    Create an Enumeratee that filters the inputs using the negation of the given predicate

    Create an Enumeratee that filters the inputs using the negation of the given predicate

    predicate

    A function to filter the input elements.

    ec

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

  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def flatten[From, To](futureOfEnumeratee: Future[Enumeratee[From, To]]): Enumeratee[From, To]

    flatten a scala.concurrent.Future of play.api.libs.iteratee.Enumeratee] into an Enumeratee

    flatten a scala.concurrent.Future of play.api.libs.iteratee.Enumeratee] into an Enumeratee

    futureOfEnumeratee

    a future of enumeratee

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

    Definition Classes
    AnyRef → Any
  17. def grouped[From]: Grouped[From]

    Create an Enumeratee that groups input using the given Iteratee.

    Create an Enumeratee that groups input using the given Iteratee.

    This will apply that Iteratee over and over, passing the result each time as the input for the target Iteratee, until EOF is reached. For example, let's say you had an Iteratee that took a stream of characters and parsed a single line:

    def takeLine = for {
      line <- Enumeratee.takeWhile[Char](_ != '\n') &>> Iteratee.getChunks
      _    <- Enumeratee.take(1) &>> Iteratee.ignore[Char]
    } yield line.mkString

    This could be used to build an Enumeratee that converts a stream of characters into a stream of lines:

    def asLines = Enumeratee.grouped(takeLine)
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. def heading[E](es: Enumerator[E]): Enumeratee[E, E]

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def map[E]: Map[E]

    Create an Enumeratee which transforms its input using a given function

  22. def mapConcat[From]: MapConcat[From] { def apply[To](f: From => Seq[To])(implicit ec: scala.concurrent.ExecutionContext): play.api.libs.iteratee.Enumeratee.CheckDone[From,To] }

    Create an Enumeratee that transforms its input elements into a sequence of input elements for the target Iteratee.

  23. def mapConcatInput[From]: MapConcatInput[From] { def apply[To](f: From => Seq[play.api.libs.iteratee.Input[To]])(implicit ec: scala.concurrent.ExecutionContext): play.api.libs.iteratee.Enumeratee.CheckDone[From,To] }

    Create an enumeratee that transforms its input into a sequence of inputs for the target iteratee.

  24. def mapFlatten[From]: MapFlatten[From] { def apply[To](f: From => play.api.libs.iteratee.Enumerator[To])(implicit ec: scala.concurrent.ExecutionContext): play.api.libs.iteratee.Enumeratee.CheckDone[From,To] }

    Create an Enumeratee that transforms its input elements into an Enumerator that is fed into the target Iteratee.

  25. def mapInput[From]: MapInput[From] { def apply[To](f: play.api.libs.iteratee.Input[From] => play.api.libs.iteratee.Input[To])(implicit ec: scala.concurrent.ExecutionContext): play.api.libs.iteratee.Enumeratee.CheckDone[From,To] }

    Create an Enumeratee that transforms its input using the given function.

    Create an Enumeratee that transforms its input using the given function.

    This is like the map function, except that it allows the Enumeratee to, for example, send EOF to the inner iteratee before EOF is encountered.

  26. def mapInputFlatten[From]: MapInputFlatten[From] { def apply[To](f: play.api.libs.iteratee.Input[From] => play.api.libs.iteratee.Enumerator[To])(implicit ec: scala.concurrent.ExecutionContext): play.api.libs.iteratee.Enumeratee.CheckDone[From,To] }

    Create an Enumeratee that transforms its input into an Enumerator that is fed into the target Iteratee.

  27. def mapInputM[From]: MapInputM[From] { def apply[To](f: play.api.libs.iteratee.Input[From] => scala.concurrent.Future[play.api.libs.iteratee.Input[To]])(implicit ec: scala.concurrent.ExecutionContext): play.api.libs.iteratee.Enumeratee.CheckDone[From,To] }

    Like mapInput, but allows the map function to asynchronously return the mapped input.

  28. def mapM[E]: MapM[E]

    Like map, but allows the map function to asynchronously return the mapped element.

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

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

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

    Definition Classes
    AnyRef
  32. def onEOF[E](action: () ⇒ Unit)(implicit ec: ExecutionContext): Enumeratee[E, E]

    Create an Enumeratee that performs an action on EOF.

    Create an Enumeratee that performs an action on EOF.

    action

    The action to perform.

    ec

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

  33. def onIterateeDone[E](action: () ⇒ Unit)(implicit ec: ExecutionContext): Enumeratee[E, E]

    Create an Enumeratee that performs an action when its Iteratee is done.

    Create an Enumeratee that performs an action when its Iteratee is done.

    action

    The action to perform.

    ec

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

  34. def passAlong[M]: CheckDone[M, M] { def step[A](k: play.api.libs.iteratee.K[M,A]): play.api.libs.iteratee.K[M,play.api.libs.iteratee.Iteratee[M,A]] }

    An enumeratee that passes all input through until EOF is reached, redeeming the final iteratee with EOF as the left over input.

  35. def recover[E](f: (Throwable, Input[E]) ⇒ Unit = (_: Throwable, _: Input[E]) => ())(implicit ec: ExecutionContext): Enumeratee[E, E]

    Create an Enumeratee that recovers an iteratee in Error state.

    Create an Enumeratee that recovers an iteratee in Error state.

    This will ignore the input that caused the iteratee's error state and use the previous state of the iteratee to handle the next input.

    Enumerator(0, 2, 4) &> Enumeratee.recover { (error, input) =>
      Logger.error(f"oops failure occurred with input: $input", error)
    } &> Enumeratee.map { i =>
      8 / i
    } |>>> Iteratee.getChunks // => List(4, 2)
    f

    Called when an error occurs with the cause of the error and the input associated with the error.

    ec

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

  36. def scanLeft[From]: ScanLeft[From]

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

    Definition Classes
    AnyRef
  38. def take[E](count: Int): Enumeratee[E, E]

    Create an Enumeratee that will take count input elements to pass to the target Iteratee, and then be done

    Create an Enumeratee that will take count input elements to pass to the target Iteratee, and then be done

    count

    The number of elements to take

  39. def takeWhile[E](p: (E) ⇒ Boolean)(implicit ec: ExecutionContext): Enumeratee[E, E]

    Create an Enumeratee that passes input through while a predicate is satisfied.

    Create an Enumeratee that passes input through while a predicate is satisfied. Once the predicate fails, no more input is passed through.

    ec

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

  40. def toString(): String

    Definition Classes
    AnyRef → Any
  41. def trailing[M](es: Enumerator[M]): CheckDone[M, M] { def step[A](k: play.api.libs.iteratee.K[M,A]): play.api.libs.iteratee.K[M,play.api.libs.iteratee.Iteratee[M,A]] }

  42. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def zip[E, A, B](inner1: Iteratee[E, A], inner2: Iteratee[E, B]): Iteratee[E, (A, B)]

    Create an Enumeratee that zips two Iteratees together.

    Create an Enumeratee that zips two Iteratees together.

    Each input gets passed to each Iteratee, and the result is a tuple of both of their results.

    If either Iteratee encounters an error, the result will be an error.

    The Enumeratee will continue consuming input until both inner Iteratees are done. If one inner Iteratee finishes before the other, the result of that Iteratee is held, and the one continues by itself, until it too is finished.

  46. def zipWith[E, A, B, C](inner1: Iteratee[E, A], inner2: Iteratee[E, B])(zipper: (A, B) ⇒ C)(implicit ec: ExecutionContext): Iteratee[E, C]

    Create an Enumeratee that zips two Iteratees together, using the passed in zipper function to combine the results of the two.

    Create an Enumeratee that zips two Iteratees together, using the passed in zipper function to combine the results of the two.

    inner1

    The first Iteratee to combine.

    inner2

    The second Iteratee to combine.

    zipper

    Used to combine the results of each Iteratee.

    ec

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

Inherited from AnyRef

Inherited from Any

Ungrouped