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.
- Alphabetic
- By Inheritance
- InputSelectorBuilder
- CloseableInput
- DoneProvider
- Input
- GopherAPIProvider
- SelectorBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait DoneSignalDelegate[T] extends CloseableInput[T]
- Definition Classes
- CloseableInput
- class Filtered extends Input[A]
- Definition Classes
- Input
- class FutureMapped[B] extends Input[B]
- Definition Classes
- Input
- class Mapped[B] extends Input[B]
- Definition Classes
- Input
- case class Read(value: A) extends Product with Serializable
- Definition Classes
- Input
- type <~ = T
- Definition Classes
- Input
- type done = Unit
- Definition Classes
- DoneProvider
- type read = T
- Definition Classes
- Input
- type timeout = FiniteDuration
- Definition Classes
- SelectorBuilder
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- macro def ?: T
synonym for read.
synonym for read.
- Definition Classes
- Input
- macro def afold[S, B](s0: S)(f: (S, T) => S): Future[S]
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
- def afoldAsync[S, B](s0: S)(f: (S, T) => Future[S])(implicit ec: ExecutionContext): Future[S]
- Definition Classes
- Input
- def afoldSync[S, B](s0: S)(f: (S, T) => S): Future[S]
- Definition Classes
- Input
- macro def aforeach(f: (T) => Unit): Future[Unit]
- Definition Classes
- Input
- def amap[B](g: (T) => Future[B]): Input[B]
- Definition Classes
- Input
- val api: GopherAPI
instance of gopher API
instance of gopher API
- Definition Classes
- InputSelectorBuilder → Input → GopherAPIProvider → SelectorBuilder
- def append(other: Input[T]): Input[T]
when the first channel is exhaused, read from second.
when the first channel is exhaused, read from second.
- Definition Classes
- Input
- macro def apply(f: PartialFunction[Any, T]): Future[T]
- def applyDone[B](cr: ContRead[Unit, B]): Unit
- Attributes
- protected
- Definition Classes
- CloseableInput
- def aread: Future[T]
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def async: AnyRef { ... /* 3 definitions in type refinement */ }
- Definition Classes
- Input
- def atake(n: Int): Future[IndexedSeq[T]]
return feature which contains sequence from first
n
elements.return feature which contains sequence from first
n
elements.- Definition Classes
- Input
- def cbread[B](f: (ContRead[T, B]) => Option[(In[T]) => Future[Continuated[B]]], ft: FlowTermination[B]): Unit
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
- InputSelectorBuilder → Input
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- lazy val closeless: Input[T]
- returns
Input without close event: i.e. reading from closeless channel after channel close will wait forever instead throwing CloseChannelException
- Definition Classes
- Input
- val done: Input[Unit]
- Definition Classes
- InputSelectorBuilder → DoneProvider
- def dup(): (Input[T], Input[T])
duplicate input
duplicate input
- Definition Classes
- Input
- implicit def ec: ExecutionContext
- Definition Classes
- SelectorBuilder
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def filter(p: (T) => Boolean): CloseableInput[T]
- Definition Classes
- CloseableInput → Input
- def flatFold(fun: (Input[T], T) => Input[T]): Input[T]
- Definition Classes
- Input
- def flatMap[B](g: (T) => Input[B]): Input[B]
- Definition Classes
- Input
- def flatMapOp[B](g: (T) => Input[B])(op: (Input[B], Input[B]) => Input[B]): Input[B]
- Definition Classes
- Input
- macro def fold[S, B](s0: S)(f: (S, T) => S): S
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
- macro def foreach(f: (Any) => T): T
- macro def foreach(f: (T) => Unit): Unit
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
- def foreachAsync(f: (T) => Future[Unit])(implicit ec: ExecutionContext): Future[Unit]
- Definition Classes
- Input
- def foreachSync(f: (T) => Unit): Future[Unit]
- Definition Classes
- Input
- def futureInput[A](f: Future[A]): FutureInput[A]
- Definition Classes
- SelectorBuilder
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def go: Future[T @scala.annotation.unchecked.uncheckedVariance]
- Definition Classes
- SelectorBuilder
- macro def handleError(f: (Throwable) => T): InputSelectorBuilder[T]
- def handleErrorWithFlowTerminationAsync(f: (ExecutionContext, FlowTermination[T], Continuated[T], Throwable) => Future[T]): InputSelectorBuilder.this.type
- Annotations
- @inline()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](g: (T) => B): CloseableInput[B]
- Definition Classes
- CloseableInput → Input
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def onError(arg: ErrorSelectorArgument[T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type
- Definition Classes
- SelectorBuilder
- def onIdle(arg: SkipSelectorArgument[T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type
- Definition Classes
- SelectorBuilder
- def onRead[E](ch: Input[E])(arg: ReadSelectorArgument[E, T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type
- Definition Classes
- SelectorBuilder
- def onTimeout(t: FiniteDuration)(arg: SkipSelectorArgument[T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type
- Definition Classes
- SelectorBuilder
- def onWrite[E](ch: Output[E])(arg: WriteSelectorArgument[E, T @scala.annotation.unchecked.uncheckedVariance]): InputSelectorBuilder.this.type
- Definition Classes
- SelectorBuilder
- def or(other: Input[T]): Input[T]
synonim for non-deteremenistics choice.
synonim for non-deteremenistics choice.
- Definition Classes
- Input
- def prepend(a: T): Input[T]
- Definition Classes
- Input
- val proxy: Channel[T]
- macro def read: T
read object from channel.
read object from channel. Must be situated inside async/go/action block.
- Definition Classes
- Input
- macro def reading[A](ch: Input[A])(f: (A) => T): InputSelectorBuilder[T]
- def readingWithFlowTerminationAsync[A](ch: Input[A], f: (ExecutionContext, FlowTermination[T], A) => Future[T]): InputSelectorBuilder[T]
- Annotations
- @inline()
- val selector: Selector[T]
- Definition Classes
- InputSelectorBuilder → SelectorBuilder
- def selectorRun: Future[T @scala.annotation.unchecked.uncheckedVariance]
- Definition Classes
- SelectorBuilder
- def seq: AnyRef { def flatMap[B](g: T => gopher.channels.Input[B]): gopher.channels.Input[B] }
- Definition Classes
- Input
- def started: InputSelectorBuilder[T]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val terminated: AtomicBoolean
- def timedAread(waitTime: FiniteDuration): Future[T]
- Definition Classes
- Input
- macro def timeout(t: FiniteDuration)(f: (FiniteDuration) => T): InputSelectorBuilder[T]
- def timeoutWithFlowTerminationAsync(t: FiniteDuration, f: (ExecutionContext, FlowTermination[T], FiniteDuration) => Future[T]): InputSelectorBuilder.this.type
- Annotations
- @inline()
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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
- Definition Classes
- SelectorBuilder
- Annotations
- @inline()
- def withFilter(p: (T) => Boolean): Input[T]
- Definition Classes
- Input
- def withIdle(f: (Skip[T @scala.annotation.unchecked.uncheckedVariance]) => Option[Future[Continuated[T @scala.annotation.unchecked.uncheckedVariance]]]): InputSelectorBuilder.this.type
- Definition Classes
- SelectorBuilder
- Annotations
- @inline()
- def withInputTimeouts(timeout: FiniteDuration): (Input[T], Input[FiniteDuration])
return pair of inputs
(ready, timeouts)
, such that when you read fromready
you receive element fromthis
and if during reading you wait more than specifiedtimeout
, than timeout message is appear intimeouts
return pair of inputs
(ready, timeouts)
, such that when you read fromready
you receive element fromthis
and if during reading you wait more than specifiedtimeout
, than timeout message is appear intimeouts
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
- 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
- Definition Classes
- SelectorBuilder
- Annotations
- @inline()
- def withTimeout(t: FiniteDuration)(f: (Skip[T @scala.annotation.unchecked.uncheckedVariance]) => Option[Future[Continuated[T @scala.annotation.unchecked.uncheckedVariance]]]): InputSelectorBuilder.this.type
- Definition Classes
- SelectorBuilder
- Annotations
- @inline()
- 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
- Definition Classes
- SelectorBuilder
- Annotations
- @inline()
- macro def writing[A](ch: Output[A], x: A)(f: (A) => T): InputSelectorBuilder[T]
write x to channel if possible
- def writingWithFlowTerminationAsync[A](ch: Output[A], x: => A, f: (ExecutionContext, FlowTermination[T], A) => Future[T]): InputSelectorBuilder.this.type
- Annotations
- @inline()
- def zip[B](x: Input[B]): Input[(T, B)]
- Definition Classes
- Input
- def zip[B](x: Iterable[B]): Input[(T, B)]
- Definition Classes
- Input
- def |(other: Input[T]): Input[T]
return input merged with 'other'.
return input merged with 'other'. (i.e. non-determenistics choice)
- Definition Classes
- Input
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated