molecule.io

Output

abstract class Output[-A] extends Flushable

A process-level output channel.

A

the type of the output's messages

Source
Output.scala
Linear Supertypes
Flushable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Output
  2. Flushable
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Output()

Abstract Value Members

  1. abstract def close(signal: Signal): IO[Unit]

    Close this output with a given signal.

    Close this output with a given signal.

    signal

    the signal

  2. abstract def debug[B <: A](label: String, f: (B) ⇒ String)(implicit arg0: Message[B]): Output[B]

    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.

  3. abstract def encode[B](f: (B) ⇒ Seg[A])(implicit arg0: Message[B]): Output[B]

    Builds a new output that applies a function to all messages written to it and concatenates the resulting segments.

    Builds a new output that applies a function to all messages written to it and concatenates the resulting segments.

    B

    the message type of the returned output.

    f

    the function to apply to each message.

    returns

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

  4. abstract def flatMap[B](f: (B) ⇒ Seg[A])(implicit arg0: Message[B]): Output[B]

    Builds a new output that applies a function to all messages written to it and concatenates the results.

    Builds a new output that applies a function to all messages written to it and concatenates the results.

    B

    the message type of the returned output.

    f

    the function to apply to each message.

    returns

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

  5. abstract def flush(ichan: IChan[A]): IO[Signal]

    Flush the content of a stream input to this output.

    Flush the content of a stream input to this output. The method returns control when the EOS is reached or raises the signal if it is different than EOS.

    It raises an exception and poisons the input stream if the output is poisoned before the end of stream has been reached.

  6. abstract def flush(input: Input[A]): IO[Signal]

    Flush the content of an input to this output.

    Flush the content of an input to this output. The method returns control when the EOS is reached or raises the signal if it is different than EOS.

    input

    the input from which to forward the content

  7. abstract def flush(uthread: UThread): Unit

    Attributes
    protected[io]
    Definition Classes
    Flushable
  8. abstract def map[B](f: (B) ⇒ A)(implicit arg0: Message[B]): Output[B]

    Builds a new output by applying a function to all the messages wrote to it.

    Builds a new output by applying a function to all the messages wrote to it.

    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.

  9. abstract def release(): IO[OChan[A]]

    Release this output from the process.

  10. abstract def smap[S, B](z: S)(fsm: (S, B) ⇒ (S, A))(implicit arg0: Message[B]): Output[B]

    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

  11. abstract def syncUpdate[B](f: (Output[A]) ⇒ Output[B]): IO[Output[B]]

    Ensure that channel is not flushing before applying a transformation.

    Ensure that channel is not flushing before applying a transformation. This is only required if the process transforms the channel after a write followed by another read operation.

  12. abstract def write(a: A): IO[Unit]

    Write a value to this output.

    Write a value to this output.

    a

    the value to write

  13. abstract def writeSeg(seg: Seg[A]): IO[Unit]

    Write a segment.

    Write a segment.

    seg

    the segment

Concrete 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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def close(): IO[Unit]

    Close this output

  9. def connect(ichan: IChan[A]): IO[RIChan[Either[Signal, Signal]]]

    Connect an input to this output.

    Connect an input to this output. Both process-level channels are released and the method returns control immediately. The signal terminating the input channel will be also copied to the output channel.

    ichan

    the input to connect

  10. def connect(input: Input[A]): IO[RIChan[Either[Signal, Signal]]]

    Connect an input to this output in a separate process.

    Connect an input to this output in a separate process. Both process-level channels are released and the method returns control immediately. The signal terminating the input channel will be also copied to the output channel.

    input

    the input to connect

  11. abstract def encode[B](f: (B) ⇒ Traversable[A]): Input[B]

    [use case] Builds a new output that applies a function to all messages written to it and concatenates the resulting segments.

    [use case]

    Builds a new output that applies a function to all messages written to it and concatenates the resulting segments.

    B

    the message type of the returned output.

    f

    the function to apply to each message.

    returns

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

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

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. abstract def flatMap[B](f: (B) ⇒ Seg[A]): Input[B]

    [use case] Builds a new output that applies a function to all messages written to it and concatenates the results.

    [use case]

    Builds a new output that applies a function to all messages written to it and concatenates the results.

    B

    the message type of the returned output.

    f

    the function to apply to each message.

    returns

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

  16. final def getClass(): java.lang.Class[_]

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

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

    Definition Classes
    Any
  19. abstract def map[B](f: (B) ⇒ A): Output[B]

    [use case] Builds a new output by applying a function to all the messages wrote to it.

    [use case]

    Builds a new output by applying a function to all the messages wrote to it.

    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.

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

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

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

    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. def write(input: Input[A]): IO[Unit]

    Write the content of an input to this output.

    Write the content of an input to this output. The method returns control when the EOS is reached or raises the signal if it is different than EOS.

    input

    the input from which to forward the content

Deprecated Value Members

  1. def forward(ichan: IChan[A]): IO[Signal]

    Forward the content of a stream input to this output.

    Forward the content of a stream input to this output. The method returns control when the EOS is reached or raises the signal if it is different than EOS.

    It raises an exception if the output is poisoned before the end of stream has been reached. In this case the input is not poisoned.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.1) Use flush instead

  2. def forward(input: Input[A]): IO[Signal]

    Forward the content of an input to this output.

    Forward the content of an input to this output. The method returns control when the EOS is reached or raises the signal if it is different than EOS.

    input

    the input from which to forward the content

    Annotations
    @deprecated
    Deprecated

    (Since version 0.1) Use flush instead

Inherited from Flushable

Inherited from AnyRef

Inherited from Any