molecule.io

SInput

trait SInput[+A] extends WInput[A]

Process-level streaming input channel interface.

A

the type of the input's messages

Linear Supertypes
WInput[A], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SInput
  2. WInput
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def compress[B](f: (seg.Seg[A]) ⇒ B)(implicit arg0: Message[B]): SInput[B]

    Builds a new input that compresses the content of each segment into a single value.

    Builds a new input that compresses the content of each segment into a single value.

    f

    A function converting segments to a single value.

    returns

    The compressed input.

  2. abstract def debug(label: String, f: (A) ⇒ String = _.toString): SInput[A]

    Builds a new debugging input that prints every message received.

    Builds a new debugging input that prints every message received.

    label

    the label to put in front of each debug line.

    f

    A function converting messages to a string.

    returns

    The same input excepted each message will be printed.

  3. abstract def dropWhile(p: (A) ⇒ Boolean): SInput[A]

    Skips longest sequence of elements of this input which satisfy given predicate p, and returns an input of the remaining elements.

    Skips longest sequence of elements of this input which satisfy given predicate p, and returns an input of the remaining elements.

    p

    the predicate used to skip elements.

    returns

    an input producing the remaining elements

  4. abstract def extract(t: UThreadContext, k: (A) ⇒ Unit, h: (Signal) ⇒ Unit): Unit

    Attributes
    protected[molecule.io]
    Definition Classes
    WInput
  5. abstract def extractSeg(t: UThreadContext, k: (seg.Seg[A]) ⇒ Unit, klast: (seg.Seg[A], Signal) ⇒ Unit): Unit

    Attributes
    protected[molecule.io]
  6. abstract def filter(p: (A) ⇒ Boolean): SInput[A]

    Selects all messages of this input which satisfy a predicate.

    Selects all messages of this input which satisfy a predicate.

    p

    the predicate used to test messages.

    returns

    a new input consisting of all messages of this input that satisfy the given predicate p. The order of the messages is preserved.

  7. abstract def fold[B](z: B)(f: (B, A) ⇒ B)(implicit arg0: Message[B]): IO[B]

    Fold left

  8. abstract def forward(output: Output[A]): IO[Signal]

    Forward the content of this input to an output.

    Forward the content of this input to an output. It returns when this input is empty but does not close the output.

    output

    the output on which to forward this content

    returns

    the signal that closes this input

  9. abstract def grouped(size: Int): SInput[Seg[A]]

    Returns an input which groups messages produced by this input into fixed size blocks.

    Returns an input which groups messages produced by this input into fixed size blocks. The last group may contain less messages the number of messages receives is not a multiple of the group size.

    size

    the size of the groups.

    returns

    an input producing the groups

  10. abstract def parse[C >: A, B](parser: Parser[C, B])(implicit arg0: Message[C], arg1: Message[B]): SInput[B]

    Produces an input resulting from applying a parser combinator to this input stream.

    Produces an input resulting from applying a parser combinator to this input stream.

    C

    the type of the messages parsed

    B

    the type of the messages in the resulting input

    parser

    a parser combinator

    returns

    input with parsed results

  11. abstract def poison(): IO[Unit]

    Poison this input with EOS signal

  12. abstract def poison(signal: Signal): IO[Unit]

    Poison this input

    Poison this input

    signal

    the poisoning signal

  13. abstract def scan[B](z: B)(op: (B, A) ⇒ B)(implicit arg0: Message[B]): SInput[B]

    Produces a collection containing cummulative results of applying the operator going first to last message.

    Produces a collection containing cummulative results of applying the operator going first to last message.

    B

    the type of the messages in the resulting input

    z

    the initial value

    op

    the binary operator applied to the intermediate result and the message

    returns

    input with intermediate results

  14. abstract def signal: Option[Signal]

    Returns some signal if the input is closed.

    Returns some signal if the input is closed.

    returns

    Some(signal) if the input contain no more elements, None otherwise.

    Definition Classes
    WInput
  15. abstract def smap[S, B](z: S)(fsm: (S, A) ⇒ (S, B))(implicit arg0: Message[B]): SInput[B]

    Produces an input containing cummulative results of applying the operator going first to last message.

    Produces an input containing cummulative results of applying the operator going first to last message.

    B

    the type of the messages in the resulting input

    z

    the initial state

    returns

    input with intermediate results

  16. abstract def span(p: (A) ⇒ Boolean): SInput[A]

    Create an input that produces longest sequence of this input that satisfy predicate p.

    Create an input that produces longest sequence of this input that satisfy predicate p. The current input cannot be manipulated until the last value of the new input has been consumed.

    p

    the predicate to satisfy

    returns

    an input producing only of the first messages that satisfy the predicate.

  17. abstract def take(size: Int): SInput[A]

    Create an input that produces first n messages of this input.

    Create an input that produces first n messages of this input. The current input cannot be manipulated until the last value of the new input has been consumed.

    returns

    an input producing only of the first n messages of this input, or less than n messages if the input produces less messages.

  18. abstract def test(thread: UThread): Promise[WInput[A]]

    Test the input stream (see stream.

    Test the input stream (see stream.TestableStream).

    Attributes
    protected[molecule.io]
    Definition Classes
    WInput

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. abstract def ++:(prefix: Seg[A]): Input[A]

    [use case]

    [use case]
    prefix

    The segment to prepend.

    returns

    an input which produces that segment first and then continues with the remaining of the stream.

    Full Signature

    abstract def ++:[B >: A](prefix: Seg[B])(implicit arg0: Message[B]): SInput[B]

  5. abstract def +:(x: A): SInput[A]

    [use case]

    [use case]
    x

    the message to prepend.

    returns

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

    Full Signature

    abstract def +:[B >: A](x: B)(implicit arg0: Message[B]): Input[B]

  6. final def ::(x: A): SInput[A]

    [use case]

    [use case]
    x

    the message to prepend.

    returns

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

    Full Signature

    final def ::[B >: A](x: B)(implicit arg0: Message[B]): Input[B]

  7. def <%+%>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless one of them is closed.

    Create a selector that reads a value on either input unless one of them is closed. If the one of them is closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  8. def <%+>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless the left one is closed.

    Create a selector that reads a value on either input unless the left one is closed. If the left input is closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  9. def <+%>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless the right one is closed.

    Create a selector that reads a value on either input unless the right one is closed. If the right input is closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  10. def <+>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless they are both closed.

    Create a selector that reads a value on either input unless they are both closed. If both input are closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  11. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. abstract def collect[B](pf: PartialFunction[A, B]): SInput[B]

    [use case]

    [use case]
    B

    the message type of the returned collection.

    pf

    the partial function which filters and maps the input.

    returns

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

    Full Signature

    abstract def collect[B](pf: PartialFunction[A, B])(implicit arg0: Message[B]): SInput[B]

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. abstract def flatMap[B](f: (A) ⇒ Seg[B]): SInput[B]

    [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 collection-valued function f to each message of this input and concatenating the results.

    Full Signature

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

  20. abstract def flatten[B]: SInput[B]

    [use case]

    [use case]
    B

    the type of the messages of each traversable collection.

    returns

    a new input resulting from concatenating all the Traversable collections.

    Full Signature

    abstract def flatten[B](implicit message: Message[B], asTraversable: (A) ⇒ Traversable[B]): SInput[B]

  21. def foreach(f: (A) ⇒ IO[Unit]): Unit

    [use case]

    [use case]
    f

    the function that is applied for its side-effect to every element. The result of function f is discarded.

    Definition Classes
    WInput
    Full Signature

    def foreach[U](f: (A) ⇒ IO[U]): IO[Unit]

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

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

    Definition Classes
    AnyRef → Any
  24. def isClosed: Boolean

    Tests whether this input is closed and returns the signal.

    Tests whether this input is closed and returns the signal.

    returns

    Some(signal) if the input contain no more elements, None otherwise.

    Definition Classes
    WInput
  25. def isEmpty: Boolean

    Tests whether this input is empty (or closed).

    Tests whether this input is empty (or closed).

    returns

    true if the input contain no more elements, false otherwise.

    Definition Classes
    WInput
  26. final def isInstanceOf[T0]: Boolean

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

    [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

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

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

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

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

    Definition Classes
    AnyRef
  31. def read(): IO[A]

    Read a single value or raise the signal if the input is closed

    Read a single value or raise the signal if the input is closed

    returns

    the next element of this input.

    Definition Classes
    WInput
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def close(): IO[Unit]

    Close/poison this input with EOS signal

    Close/poison this input with EOS signal

    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use poison instead

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

    Close/poison this input

    Close/poison this input

    signal

    the poisoning signal

    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use poison instead

Inherited from WInput[A]

Inherited from AnyRef

Inherited from Any

Ungrouped