trait Channel[-A] extends AnyRef
An immutable and type-safe representation of one or more netty channels. A
represents the type of messages that can be written on the channel.
- Alphabetic
- By Inheritance
- Channel
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def autoRead(flag: Boolean)(implicit trace: Trace): UIO[Unit]
When set to
true
(default) it will automatically read messages from the channel.When set to
true
(default) it will automatically read messages from the channel. When set to false, the channel will not read messages untilread
is called. - abstract def awaitClose(implicit trace: Trace): UIO[Unit]
Provides a way to wait for the channel to be closed.
- abstract def close(await: Boolean = false)(implicit trace: Trace): Task[Unit]
Closes the channel.
Closes the channel. Pass true to await to wait for the channel to be closed.
- abstract def contramap[A1](f: (A1) => A): Channel[A1]
Creates a new channel that can write a different type of message by using a transformation function.
- abstract def flush(implicit trace: Trace): Task[Unit]
Flushes the pending write operations on the channel.
- abstract def id(implicit trace: Trace): String
Returns the globally unique identifier of this channel.
- abstract def isAutoRead(implicit trace: Trace): UIO[Boolean]
Returns
true
if auto-read is set to true. - abstract def read(implicit trace: Trace): UIO[Unit]
Schedules a read operation on the channel.
Schedules a read operation on the channel. This is not necessary if auto-read is enabled.
- abstract def write(msg: A, await: Boolean = false)(implicit trace: Trace): Task[Unit]
Schedules a write operation on the channel.
Schedules a write operation on the channel. The actual write only happens after calling
flush
. Passtrue
to await the completion of the write operation. - abstract def writeAndFlush(msg: A, await: Boolean = false)(implicit trace: Trace): Task[Unit]
Writes and flushes the message on the channel.
Writes and flushes the message on the channel. Pass
true
to await the completion of the write operation.
Concrete 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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])