play.api.libs.iteratee

Iteratee

object Iteratee

Various helper methods to construct, compose and traverse Iteratees.

Source
Iteratee.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Iteratee
  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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def consume[E]: AnyRef { def apply[B, That]()(implicit t: E => TraversableOnce[B],implicit bf: scala.collection.generic.CanBuildFrom[E,B,That]): play.api.libs.iteratee.Iteratee[E,That] }

    Create an play.api.libs.iteratee.Iteratee which consumes and concatenates all Input chunks

    Create an play.api.libs.iteratee.Iteratee which consumes and concatenates all Input chunks

    Example:

    // Get all chunks of input
    def getAll: Iteratee[Array[Byte], Array[Byte]] = Iteratee.consume[Array[Byte]]()

    Chunks type should be viewable as TraversableOnce

  9. def eofOrElse[E]: AnyRef { def apply[A, B](otherwise: B)(eofValue: A): play.api.libs.iteratee.Iteratee[E,Either[B,A]] }

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def flatten[E, A](i: Future[Iteratee[E, A]]): Iteratee[E, A]

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

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

    i

    a promise of iteratee

  14. def fold[E, A](state: A)(f: (A, E) ⇒ A): Iteratee[E, A]

    Create an play.api.libs.iteratee.Iteratee which folds the content of the Input using a given function and an initial state

    Create an play.api.libs.iteratee.Iteratee which folds the content of the Input using a given function and an initial state

    Example:

    // Count the number of input elements
    def count[E]: Iteratee[E, Int] = Iteratee.fold(0)((c, _) => c + 1)
    state

    initial state

    f

    a function folding the previous state and an input to a new state

  15. def fold1[E, A](state: Future[A])(f: (A, E) ⇒ Future[A]): Iteratee[E, A]

    Create an play.api.libs.iteratee.Iteratee which folds the content of the Input using a given function and an initial state

    Create an play.api.libs.iteratee.Iteratee which folds the content of the Input using a given function and an initial state

    It also gives the opportunity to return a scala.concurrent.Future so that promises are combined in a complete reactive flow of logic.

    state

    initial state

    f

    a function folding the previous state and an input to a new promise of state

  16. def fold2[E, A](state: A)(f: (A, E) ⇒ Future[(A, Boolean)]): Iteratee[E, A]

  17. def foldM[E, A](state: A)(f: (A, E) ⇒ Future[A]): Iteratee[E, A]

    Create an play.api.libs.iteratee.Iteratee which folds the content of the Input using a given function and an initial state

    Create an play.api.libs.iteratee.Iteratee which folds the content of the Input using a given function and an initial state

    M stands for Monadic which in this case means returning a scala.concurrent.Future for the function argument f, so that promises are combined in a complete reactive flow of logic.

    state

    initial state

    f

    a function folding the previous state and an input to a new promise of state

  18. def foreach[E](f: (E) ⇒ Unit): Iteratee[E, Unit]

    f

    the function that should be executed for every chunk

    returns

    an play.api.libs.iteratee.Iteratee which executes a provided function for every chunk. Returns Done on EOF.

    Example:

    // Get all chunks of input
    def printChunks: Iteratee[String, Unit] = Iteratee.foreach[String]( s => println(s) )
  19. def getChunks[E]: Iteratee[E, List[E]]

    Consume all the chunks from the stream, and return a list.

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

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

    Definition Classes
    AnyRef → Any
  22. def head[E]: Iteratee[E, Option[E]]

    Create an iteratee that takes the first element of the stream, if one occurs before EOF

  23. def ignore[E]: Iteratee[E, Unit]

    returns

    an play.api.libs.iteratee.Iteratee which just ignores its input

  24. def isDoneOrError[E, A](it: Iteratee[E, A]): Future[Boolean]

  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  29. def repeat[E, A](i: Iteratee[E, A]): Iteratee[E, Seq[A]]

    i

    an iteratee used repeatedly to compute a sequence of results

    returns

    an play.api.libs.iteratee.Iteratee which pushes the input into the provided play.api.libs.iteratee.Iteratee, starting over again each time it terminates until an EOF is received, collecting a sequence of results of the different use of the iteratee

  30. def skipToEof[E]: Iteratee[E, Unit]

    Ignore all the input of the stream, and return done when EOF is encountered.

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

    Definition Classes
    AnyRef
  32. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any

Ungrouped