Class

gopher.channels

IOChannel

Related Doc: package channels

Permalink

class IOChannel[A] extends Input[A] with Output[A]

Linear Supertypes
Output[A], Input[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. IOChannel
  2. Output
  3. Input
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IOChannel(futureChannelRef: Future[ActorRef], api: GopherAPI)

    Permalink

Type Members

  1. type <~ = A

    Permalink
    Definition Classes
    Input
  2. type read = A

    Permalink
    Definition Classes
    Input
  3. type write = A

    Permalink
    Definition Classes
    Output
  4. type writeExp[X] = A

    Permalink
    Definition Classes
    Output
  5. type ~> = A

    Permalink
    Definition Classes
    Output

Value Members

  1. macro def !(a: A): Unit

    Permalink

    shortcut for blocking write.

    shortcut for blocking write.

    Definition Classes
    Output
  2. final def !=(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. macro def <~(a: A): Output[A]

    Permalink

    shortcut for blocking write.

    shortcut for blocking write.

    Definition Classes
    Output
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. macro def ?: A

    Permalink

    synonym for read.

    synonym for read.

    Definition Classes
    Input
  7. macro def aforeach(f: (A) ⇒ Unit): Future[Unit]

    Permalink
    Definition Classes
    Input
  8. val api: GopherAPI

    Permalink

    instance of gopher API

    instance of gopher API

    Definition Classes
    IOChannelOutputInput
  9. def aread: Future[A]

    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
  10. final def asInstanceOf[T0]: T0

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

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

    Permalink

    return feature which contains sequence from first n elements.

    return feature which contains sequence from first n elements.

    Definition Classes
    Input
  13. def awrite(a: A): Future[A]

    Permalink
    Definition Classes
    Output
  14. def awriteAll[C <: Iterable[A]](c: C): Future[Unit]

    Permalink
    Definition Classes
    Output
  15. def cbread[B](f: (ContRead[A, B]) ⇒ Option[(In[A]) ⇒ Future[Continuated[B]]], flwt: 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
    IOChannelInput
  16. def cbwrite[B](f: (ContWrite[A, B]) ⇒ Option[(A, Future[Continuated[B]])], flwt: FlowTermination[B]): Unit

    Permalink

    apply f and send result to channels processor.

    apply f and send result to channels processor.

    Definition Classes
    IOChannelOutput
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def close(): Unit

    Permalink
  19. def dup(): (Input[A], Input[A])

    Permalink

    duplicate input

    duplicate input

    Definition Classes
    Input
  20. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def filter(p: (A) ⇒ Boolean): Input[A]

    Permalink
    Definition Classes
    Input
  23. def finalize(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    IOChannel → AnyRef
  24. macro def foreach(f: (A) ⇒ 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
  25. def foreachAsync(f: (A) ⇒ Future[Unit])(implicit ec: ExecutionContext): Future[Unit]

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

    Permalink
    Definition Classes
    Input
  27. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  29. def isClosed: Boolean

    Permalink
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. def map[B](g: (A) ⇒ B): Input[B]

    Permalink
    Definition Classes
    Input
  32. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  35. macro def read: A

    Permalink

    read object from channel.

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

    Definition Classes
    Input
  36. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. def withFilter(p: (A) ⇒ Boolean): Input[A]

    Permalink
    Definition Classes
    Input
  42. def withInputTimeouts(timeout: FiniteDuration): (Input[A], 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
  43. def withOutputTimeouts(timeout: FiniteDuration): (Output[A], Input[FiniteDuration])

    Permalink

    provide pair from Output and Input (ready, timeouts) such that writing to ready will case writing to output and if it was not completed during timeout than appropriative duration will be availabe in timeouts input.

    provide pair from Output and Input (ready, timeouts) such that writing to ready will case writing to output and if it was not completed during timeout than appropriative duration will be availabe in timeouts input.

    val (chReady, chTimeouts) = ch withOutputTimeouts (5 seconds) select.forever { case x: chReady.write if (x==somethingToWrite) => Console.println(s" ${x} send") case t: chTimeouts.read if (x==somethingToWrite) => Console.println(s"timeout during writing") }

    Definition Classes
    Output
  44. macro def write(a: A): A

    Permalink

    'blocking' write of 'a' to channel.

    'blocking' write of 'a' to channel. Note, that this method can be called only inside 'go' or 'async' blocks.

    Definition Classes
    Output
  45. macro def writeAll[C <: Iterable[A]](it: C): Unit

    Permalink
    Definition Classes
    Output
  46. def zip[B](x: Input[B]): Input[(A, B)]

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

    Permalink
    Definition Classes
    Input
  48. def |(other: Input[A]): Input[A]

    Permalink

    return input merged with 'other'.

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

    Definition Classes
    Input

Inherited from Output[A]

Inherited from Input[A]

Inherited from AnyRef

Inherited from Any

Ungrouped