play.api.libs

iteratee

package iteratee

The Iteratee monad provides strict, safe, and functional I/O.

Source
package.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

Type Members

  1. trait Enumeratee[From, To] extends AnyRef

    Combines the roles of an Iteratee[From] and a Enumerator[To].

    Combines the roles of an Iteratee[From] and a Enumerator[To]. This allows adapting of streams to that modify input produced by an Enumerator, or to be consumed by a Iteratee.

  2. trait Enumerator[E] extends AnyRef

    A producer which pushes input to an play.api.libs.iteratee.Iteratee.

  3. sealed trait Input[+E] extends AnyRef

    Input that can be consumed by an iteratee

  4. trait Iteratee[E, +A] extends AnyRef

    An Iteratee consumes a stream of elements of type E, producing a result of type A.

    An Iteratee consumes a stream of elements of type E, producing a result of type A. The stream itself is represented by the Input trait. An Iteratee is an immutable data type, so each step in consuming the stream generates a new Iteratee with a new state.

    At a high level, an Iteratee is just a function that takes a piece of input and returns either a final result or a new function that takes another piece of input. To represent this, an Iteratee can be in one of three states (see the play.api.libs.iteratee.Step trait): play.api.libs.iteratee.Done, which means it contains a result and potentially some unconsumed part of the stream; play.api.libs.iteratee.Cont, which means it contains a function to be invoked to generate a new Iteratee from the next piece of input; play.api.libs.iteratee.Error, which means it contains an error message and potentially some unconsumed part of the stream.

    One would expect to transform an Iteratee through the Cont state N times, eventually arriving at either the Done or Error state.

    Typically an play.api.libs.iteratee.Enumerator would be used to push data into an Iteratee by invoking the function in the play.api.libs.iteratee.Cont state until either 1) the iteratee leaves the Cont state or 2) the enumerator runs out of data.

    The Iteratee does not do any resource management (such as closing streams); the producer pushing stuff into the Iteratee has that responsibility.+ * The state of an Iteratee (the current play.api.libs.iteratee.Step may not be available synchronously; it may be pending an asynchronous computation. This is the difference between Iteratee and Step.

    E

    Input type

    A

    Result type of this Iteratee

  5. class IterateeException extends IterateeExeption

    An Exception that represents an Iteratee that ended up in an Error state with the given error message.

  6. type K[E, A] = (Input[E]) ⇒ Iteratee[E, A]

  7. sealed trait Step[E, +A] extends AnyRef

    Represents the state of an iteratee.

  8. class IterateeExeption extends Exception

    An Exception that represents an Iteratee that ended up in an Error state with the given error message.

    An Exception that represents an Iteratee that ended up in an Error state with the given error message. This exception will eventually be removed and replaced with IterateeException (notice the extra c).

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4.0) Use IterateeException instead (notice the extra 'c')

Value Members

  1. object CharEncoding

    Enumeratees for converting chunks of bytes to chunks of chars, and vice-versa.

    Enumeratees for converting chunks of bytes to chunks of chars, and vice-versa.

    These methods can handle cases where characters straddle a chunk boundary, and redistribute the data. An erroneous encoding or an incompatible decoding causes a Step.Error.

  2. object Concurrent

    Utilities for concurrent usage of iteratees, enumerators and enumeratees.

  3. object Cont

  4. object Done

  5. object Enumeratee

  6. object Enumerator

    Enumerator is the source that pushes input into a given iteratee.

    Enumerator is the source that pushes input into a given iteratee. It enumerates some input into the iteratee and eventually returns the new state of that iteratee.

  7. object Error

  8. object Execution

    Contains the default ExecutionContext used by Iteratees.

  9. object Input

  10. object Iteratee

    Various helper methods to construct, compose and traverse Iteratees.

  11. object Parsing

  12. object Step

  13. object Traversable

Inherited from AnyRef

Inherited from Any

Ungrouped