akka.actor
Class IO.Iteratee<A>

java.lang.Object
  extended by akka.actor.IO.Iteratee<A>
Direct Known Subclasses:
IO.Done, IO.Failure, IO.Next
Enclosing class:
IO

public abstract static class IO.Iteratee<A>
extends java.lang.Object

A basic Iteratee implementation of Oleg's Iteratee (http://okmij.org/ftp/Streams.html). To keep this implementation simple it has no support for Enumerator or Input types other then ByteString.

Other Iteratee implementations can be used in place of this one if any missing features are required.


Constructor Summary
IO.Iteratee()
           
 
Method Summary
 scala.Tuple2<IO.Iteratee<A>,IO.Input> apply(IO.Input input)
          Processes the given IO.Input, returning the resulting Iteratee and the remaining Input.
<B> IO.Iteratee<B>
flatMap(scala.Function1<A,IO.Iteratee<B>> f)
          Applies a function to the result of this Iteratee, resulting in a new Iteratee.
 A get()
          Passes an akka.actor.IO.EOF to this Iteratee and returns the result if available.
<B> IO.Iteratee<B>
map(scala.Function1<A,B> f)
          Applies a function to transform the result of this Iteratee.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IO.Iteratee

public IO.Iteratee()
Method Detail

apply

public final scala.Tuple2<IO.Iteratee<A>,IO.Input> apply(IO.Input input)
Processes the given IO.Input, returning the resulting Iteratee and the remaining Input.


get

public final A get()
Passes an akka.actor.IO.EOF to this Iteratee and returns the result if available.

If this Iteratee is in a failure state then the Exception will be thrown.

If this Iteratee is not well behaved (does not return a result on EOF) then a "Divergent Iteratee" Exception will be thrown.


flatMap

public final <B> IO.Iteratee<B> flatMap(scala.Function1<A,IO.Iteratee<B>> f)
Applies a function to the result of this Iteratee, resulting in a new Iteratee. Any unused IO.Input that is given to this Iteratee will be passed to that resulting Iteratee. This is the primary method of composing Iteratees together in order to process an Input stream.


map

public final <B> IO.Iteratee<B> map(scala.Function1<A,B> f)
Applies a function to transform the result of this Iteratee.