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.
A producer which pushes input to an play.api.libs.iteratee.Iteratee.
Input that can be consumed by an iteratee
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.
Input type
Result type of this Iteratee
An Exception that represents an Iteratee that ended up in an Error state with the given error message.
Represents the state of an iteratee.
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
).
(Since version 2.4.0) Use IterateeException instead (notice the extra 'c')
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.
Utilities for concurrent usage of iteratees, enumerators and enumeratees.
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.
Contains the default ExecutionContext used by Iteratees.
Various helper methods to construct, compose and traverse Iteratees.
The Iteratee monad provides strict, safe, and functional I/O.