Class/Object

molecule.stream

OChan

Related Docs: object OChan | package stream

Permalink

abstract class OChan[-A] extends AnyRef

A stream output channel.

A

the type of the output's messages

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OChan
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OChan()

    Permalink

Abstract Value Members

  1. abstract def add[B](t: (OChan[A]) ⇒ OChan[B])(implicit arg0: Message[B]): OChan[B]

    Permalink

    Add a stream transformer to this channel.

    Add a stream transformer to this channel.

    t

    the transformer

    returns

    the transformed channel

  2. abstract def close(signal: Signal): Unit

    Permalink

    Close the channel

  3. abstract def write(t: UThread, seg: Seg[A], sigOpt: Option[Signal], k: (OChan[A]) ⇒ Unit): Unit

    Permalink

    Write a segment on this channel.

    Write a segment on this channel.

    t

    the user-level thread

    k

    the continuation invoked once the message has been written

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def :+:(seg: Seg[A]): OChan[A]

    Permalink

    [use case]

    [use case]
    seg

    the segment to prepend.

    returns

    an output which produces seg as first segment and which continues with the remaining of the stream.

    Full Signature

    def :+:[B <: A](seg: Seg[B])(implicit arg0: Message[B]): OChan[B]

  4. def :+:(x: A): OChan[A]

    Permalink

    [use case]

    [use case]
    x

    the message to prepend.

    returns

    an output which produces x as first message and which continues with the remaining of the stream.

    Full Signature

    def :+:[B <: A](x: B)(implicit arg0: Message[B]): OChan[B]

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def close(t: UThread, a: A, signal: Signal): Unit

    Permalink

    Write last value

    Write last value

    a

    the last value

  9. def close(t: UThread, seg: Seg[A], signal: Signal): Unit

    Permalink

    Write the last segment

    Write the last segment

    Note that this must flush any buffered channel (@see BufferedOChan).

    seg

    the last segment

  10. def collect[B](pf: PartialFunction[B, A]): OChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned output channel.

    pf

    the partial function which filters and maps the stream elements.

    returns

    a new output resulting from applying the partial function pf to each message on which it is defined. The order of the messages is preserved.

    Full Signature

    def collect[B](f: PartialFunction[B, A])(implicit arg0: Message[B]): OChan[B]

  11. def compress[B](f: (Seg[B]) ⇒ A): OChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned output.

    f

    the function to apply to each segment and returning a single message.

    returns

    a new output resulting from applying the given collection-valued function f to each segment written to it.

    Full Signature

    def compress[B](f: (Seg[B]) ⇒ A)(implicit arg0: Message[B]): OChan[B]

  12. def debug[B <: A](label: String, f: (B) ⇒ String = b: B => b.toString)(implicit arg0: Message[B]): OChan[B]

    Permalink

    Builds a new debugging output that prints every message received.

    Builds a new debugging output that prints every message received.

    label

    the label to put in front of each debug line.

    f

    A function converting messages to a string (defaults to _.toString).

    returns

    The same output excepted each message will be printed.

  13. def encode[B](f: (B) ⇒ Seg[A]): OChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned output.

    f

    the function to apply to each message and returning a segment.

    returns

    a new output resulting from applying the given collection-valued function f to each message written and concatenating the results.

    Full Signature

    def encode[B](f: (B) ⇒ Seg[A])(implicit arg0: Message[B]): OChan[B]

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def flatMap[B](f: (B) ⇒ Traversable[A]): OChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned output.

    f

    the function to apply to each message.

    returns

    a new input resulting from applying the given collection-valued function f to each message of this input and concatenating the results.

    Full Signature

    def flatMap[B](f: (B) ⇒ Seg[A])(implicit arg0: Message[B]): OChan[B]

  18. def flush[B <: A](ichan: IChan[B]): Process[(IChan[B], OChan[B])]

    Permalink

    Flush the content of an input to this output.

    Flush the content of an input to this output. It stops as soon as one of the two channel is poisoned and it does not propagate the poison signal.

    returns

    A stream that returns the channels after the flush operation. If the stream completed successfully, then the input channel is closed, otherwise the output channel is poisoned.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def map[B](f: (B) ⇒ A): OChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned input.

    f

    the function to apply to each message.

    returns

    a new input resulting from applying the given function f to each message of this input.

    Full Signature

    def map[B](f: (B) ⇒ A)(implicit arg0: Message[B]): OChan[B]

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

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def parse[B](parse: Parser[B, A])(implicit arg0: Message[B]): OChan[B]

    Permalink

    Produces an output resulting from applying a repeatedly a parser combinator to its messages.

    Produces an output resulting from applying a repeatedly a parser combinator to its messages.

    B

    the type of the messages of the resulting output

    returns

    output which parses its messages

  27. def smap[S, B](z: S)(fsm: (S, B) ⇒ (S, A))(implicit arg0: Message[B]): OChan[B]

    Permalink

    Builds an output producing cummulative results of applying the operator going from first to last message written.

    Builds an output producing cummulative results of applying the operator going from first to last message written.

    B

    the type of the messages accepted by the resulting output

    z

    the initial state

    returns

    output producing intermediate results

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

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped