Class

gopher.channels

InputSelectorBuilder

Related Doc: package channels

Permalink

class InputSelectorBuilder[T] extends SelectorBuilder[T] with CloseableInput[T]

Builder for 'input' selector. Can be obtained as gopherApi.select.input. or map of forever selector.

Linear Supertypes
CloseableInput[T], DoneProvider[Unit], Input[T], GopherAPIProvider, SelectorBuilder[T @scala.annotation.unchecked.uncheckedVariance], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InputSelectorBuilder
  2. CloseableInput
  3. DoneProvider
  4. Input
  5. GopherAPIProvider
  6. SelectorBuilder
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InputSelectorBuilder(api: GopherAPI)

    Permalink

Type Members

  1. type <~ = T

    Permalink
    Definition Classes
    Input
  2. trait DoneSignalDelegate[T] extends CloseableInput[T]

    Permalink
    Definition Classes
    CloseableInput
  3. class Filtered extends Input[A]

    Permalink
    Definition Classes
    Input
  4. class FutureMapped[B] extends Input[B]

    Permalink
    Definition Classes
    Input
  5. class Mapped[B] extends Input[B]

    Permalink
    Definition Classes
    Input
  6. case class Read(value: A) extends Product with Serializable

    Permalink
    Definition Classes
    Input
  7. type done = Unit

    Permalink
    Definition Classes
    DoneProvider
  8. type read = T

    Permalink
    Definition Classes
    Input
  9. type timeout = FiniteDuration

    Permalink
    Definition Classes
    SelectorBuilder

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. macro def ?: T

    Permalink

    synonym for read.

    synonym for read.

    Definition Classes
    Input
  5. macro def afold[S, B](s0: S)(f: (S, T) ⇒ S): Future[S]

    Permalink

    async incarnation of fold.

    async incarnation of fold. Fold return future, which successed when channel is closed. Operations withing fold applyed on result on each other, starting with s0. val fsum = ch.afold(0){ (s, n) => s+n } Here in fsum will be future with value: sum of all elements in channel until one has been closed.

    Definition Classes
    Input
  6. def afoldAsync[S, B](s0: S)(f: (S, T) ⇒ Future[S])(implicit ec: ExecutionContext): Future[S]

    Permalink
    Definition Classes
    Input
  7. def afoldSync[S, B](s0: S)(f: (S, T) ⇒ S): Future[S]

    Permalink
    Definition Classes
    Input
  8. macro def aforeach(f: (T) ⇒ Unit): Future[Unit]

    Permalink
    Definition Classes
    Input
  9. def amap[B](g: (T) ⇒ Future[B]): Input[B]

    Permalink
    Definition Classes
    Input
  10. val api: GopherAPI

    Permalink

    instance of gopher API

    instance of gopher API

    Definition Classes
    InputSelectorBuilderInputGopherAPIProviderSelectorBuilder
  11. def append(other: Input[T]): Input[T]

    Permalink

    when the first channel is exhaused, read from second.

    when the first channel is exhaused, read from second.

    Definition Classes
    Input
  12. macro def apply(f: PartialFunction[Any, T]): Future[T]

    Permalink
  13. def applyDone[B](cr: ContRead[Unit, B]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    CloseableInput
  14. def aread: Future[T]

    Permalink

    async version of read.

    async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.

    Definition Classes
    Input
  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. def async: AnyRef { ... /* 3 definitions in type refinement */ }

    Permalink
    Definition Classes
    Input
  17. def atake(n: Int): Future[IndexedSeq[T]]

    Permalink

    return feature which contains sequence from first n elements.

    return feature which contains sequence from first n elements.

    Definition Classes
    Input
  18. def cbread[B](f: (ContRead[T, B]) ⇒ Option[(In[T]) ⇒ Future[Continuated[B]]], ft: FlowTermination[B]): Unit

    Permalink

    apply f, when input will be ready and send result to API processor

    apply f, when input will be ready and send result to API processor

    Definition Classes
    InputSelectorBuilderInput
  19. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. lazy val closeless: Input[T]

    Permalink

    returns

    Input without close event: i.e. reading from closeless channel after channel close will wait forever instead throwing CloseChannelException

    Definition Classes
    Input
  21. val done: Input[Unit]

    Permalink
    Definition Classes
    InputSelectorBuilderDoneProvider
  22. def dup(): (Input[T], Input[T])

    Permalink

    duplicate input

    duplicate input

    Definition Classes
    Input
  23. implicit def ec: ExecutionContext

    Permalink
    Definition Classes
    SelectorBuilder
  24. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  26. def filter(p: (T) ⇒ Boolean): CloseableInput[T]

    Permalink
    Definition Classes
    CloseableInputInput
  27. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def flatFold(fun: (Input[T], T) ⇒ Input[T]): Input[T]

    Permalink
    Definition Classes
    Input
  29. def flatMap[B](g: (T) ⇒ Input[B]): Input[B]

    Permalink
    Definition Classes
    Input
  30. def flatMapOp[B](g: (T) ⇒ Input[B])(op: (Input[B], Input[B]) ⇒ Input[B]): Input[B]

    Permalink
    Definition Classes
    Input
  31. macro def fold[S, B](s0: S)(f: (S, T) ⇒ S): S

    Permalink

    fold opeations, available inside async bloc.

    fold opeations, available inside async bloc. go { val sum = ch.fold(0){ (s,n) => s+n } }

    Definition Classes
    Input
  32. macro def foreach(f: (Any) ⇒ T): T

    Permalink
  33. macro def foreach(f: (T) ⇒ Unit): Unit

    Permalink

    run f each time when new object is arrived.

    run f each time when new object is arrived. Ended when input closes.

    must be inside go/async/action block.

    Definition Classes
    Input
  34. def foreachAsync(f: (T) ⇒ Future[Unit])(implicit ec: ExecutionContext): Future[Unit]

    Permalink
    Definition Classes
    Input
  35. def foreachSync(f: (T) ⇒ Unit): Future[Unit]

    Permalink
    Definition Classes
    Input
  36. def futureInput[A](f: Future[A]): FutureInput[A]

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  37. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  38. final def go: Future[T @scala.annotation.unchecked.uncheckedVariance]

    Permalink
    Definition Classes
    SelectorBuilder
  39. macro def handleError(f: (Throwable) ⇒ T): InputSelectorBuilder[T]

    Permalink
  40. def handleErrorWithFlowTerminationAsync(f: (ExecutionContext, FlowTermination[T], Continuated[T], Throwable) ⇒ Future[T]): InputSelectorBuilder.this.type

    Permalink
    Annotations
    @inline()
  41. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  43. def map[B](g: (T) ⇒ B): CloseableInput[B]

    Permalink
    Definition Classes
    CloseableInputInput
  44. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  47. def onError(arg: ErrorSelectorArgument[T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  48. def onIdle(arg: SkipSelectorArgument[T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  49. def onRead[E](ch: Input[E])(arg: ReadSelectorArgument[E, T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  50. def onTimeout(t: FiniteDuration)(arg: SkipSelectorArgument[T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  51. def onWrite[E](ch: Output[E])(arg: WriteSelectorArgument[E, T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  52. def or(other: Input[T]): Input[T]

    Permalink

    synonim for non-deteremenistics choice.

    synonim for non-deteremenistics choice.

    Definition Classes
    Input
  53. def prepend(a: T): Input[T]

    Permalink
    Definition Classes
    Input
  54. val proxy: Channel[T]

    Permalink
  55. macro def read: T

    Permalink

    read object from channel.

    read object from channel. Must be situated inside async/go/action block.

    Definition Classes
    Input
  56. macro def reading[A](ch: Input[A])(f: (A) ⇒ T): InputSelectorBuilder[T]

    Permalink
  57. def readingWithFlowTerminationAsync[A](ch: Input[A], f: (ExecutionContext, FlowTermination[T], A) ⇒ Future[T]): InputSelectorBuilder[T]

    Permalink
    Annotations
    @inline()
  58. val selector: Selector[T]

    Permalink
    Definition Classes
    InputSelectorBuilderSelectorBuilder
  59. def selectorRun: Future[T @scala.annotation.unchecked.uncheckedVariance]

    Permalink
    Definition Classes
    SelectorBuilder
  60. def seq: AnyRef { def flatMap[B](g: T => gopher.channels.Input[B]): gopher.channels.Input[B] }

    Permalink
    Definition Classes
    Input
  61. def started: InputSelectorBuilder[T]

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

    Permalink
    Definition Classes
    AnyRef
  63. val terminated: AtomicBoolean

    Permalink
  64. macro def timeout(t: FiniteDuration)(f: (FiniteDuration) ⇒ T): InputSelectorBuilder[T]

    Permalink
  65. def timeoutWithFlowTerminationAsync(t: FiniteDuration, f: (ExecutionContext, FlowTermination[T], FiniteDuration) ⇒ Future[T]): InputSelectorBuilder.this.type

    Permalink
    Annotations
    @inline()
  66. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. def withError(f: (ExecutionContext, FlowTermination[T @scala.annotation.unchecked.uncheckedVariance], Continuated[T @scala.annotation.unchecked.uncheckedVariance], Throwable) ⇒ Future[Continuated[T @scala.annotation.unchecked.uncheckedVariance]]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  71. def withFilter(p: (T) ⇒ Boolean): Input[T]

    Permalink
    Definition Classes
    Input
  72. def withIdle(f: (Skip[T @scala.annotation.unchecked.uncheckedVariance]) ⇒ Option[Future[Continuated[T @scala.annotation.unchecked.uncheckedVariance]]]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  73. def withInputTimeouts(timeout: FiniteDuration): (Input[T], Input[FiniteDuration])

    Permalink

    return pair of inputs (ready, timeouts), such that when you read from ready you receive element from this and if during reading you wait more than specified timeout, than timeout message is appear in timeouts

    return pair of inputs (ready, timeouts), such that when you read from ready you receive element from this and if during reading you wait more than specified timeout, than timeout message is appear in timeouts

    val (inReady, inTimeouts) = in withInputTimeouts (10 seconds) select.forever { case x: inReady.read => Console.println(s"received value ${value}") case x: inTimeouts.read => Console.println(s"timeout occured") }

    Definition Classes
    Input
  74. def withReader[B](ch: Input[B], f: (ContRead[B, T @scala.annotation.unchecked.uncheckedVariance]) ⇒ Option[(In[B]) ⇒ Future[Continuated[T @scala.annotation.unchecked.uncheckedVariance]]]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  75. def withTimeout(t: FiniteDuration)(f: (Skip[T @scala.annotation.unchecked.uncheckedVariance]) ⇒ Option[Future[Continuated[T @scala.annotation.unchecked.uncheckedVariance]]]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  76. def withWriter[B](ch: Output[B], f: (ContWrite[B, T @scala.annotation.unchecked.uncheckedVariance]) ⇒ Option[(B, Future[Continuated[T @scala.annotation.unchecked.uncheckedVariance]])]): InputSelectorBuilder.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  77. macro def writing[A](ch: Output[A], x: A)(f: (A) ⇒ T): InputSelectorBuilder[T]

    Permalink

    write x to channel if possible

  78. def writingWithFlowTerminationAsync[A](ch: Output[A], x: ⇒ A, f: (ExecutionContext, FlowTermination[T], A) ⇒ Future[T]): InputSelectorBuilder.this.type

    Permalink
    Annotations
    @inline()
  79. def zip[B](x: Input[B]): Input[(T, B)]

    Permalink
    Definition Classes
    Input
  80. def zip[B](x: Iterable[B]): Input[(T, B)]

    Permalink
    Definition Classes
    Input
  81. def |(other: Input[T]): Input[T]

    Permalink

    return input merged with 'other'.

    return input merged with 'other'. (i.e. non-determenistics choice)

    Definition Classes
    Input

Inherited from CloseableInput[T]

Inherited from DoneProvider[Unit]

Inherited from Input[T]

Inherited from GopherAPIProvider

Inherited from SelectorBuilder[T @scala.annotation.unchecked.uncheckedVariance]

Inherited from AnyRef

Inherited from Any

Ungrouped