Packages

final class SelectionKey extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SelectionKey
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SelectionKey(selectionKey: java.nio.channels.SelectionKey)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def attach(ob: Option[AnyRef]): UIO[Option[AnyRef]]
  6. final def attachment: UIO[Option[AnyRef]]
  7. final def cancel: UIO[Unit]
  8. def channel: SelectableChannel
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(obj: Any): Boolean
    Definition Classes
    SelectionKey → AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    SelectionKey → AnyRef → Any
  15. final def interestOps(ops: Set[Operation]): UIO[Unit]
  16. final def interestOps: UIO[Set[Operation]]
  17. def interested(op: Operation): UIO[Set[Operation]]
  18. final def isAcceptable: UIO[Boolean]
  19. final def isConnectable: UIO[Boolean]
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def isReadable: UIO[Boolean]
  22. final def isValid: UIO[Boolean]
  23. final def isWritable: UIO[Boolean]
  24. def matchChannel[R, E, A](matcher: (Set[Operation]) => PartialFunction[SelectableChannel, ZIO[R, E, A]]): ZIO[R, E, A]

    Convenience method for processing keys from the selected key set.

    Convenience method for processing keys from the selected key set.

    Pattern matching on the channel type avoids the need for potentially unsafe casting to the channel type you expect.

    If a channel type is selected that does not match the pattern match supplied then a defect is raised.

    Usage:

    for {
      _ <- selector.select
      _ <- selector.foreachSelectedKey { key =>
        key.matchChannel { readyOps => {
          case channel: ServerSocketChannel if readyOps(Operation.Accept) =>
            // use `channel` to accept connection
          case channel: SocketChannel =>
            IO.when(readyOps(Operation.Read)) {
              // use `channel` to read
            } *>
              IO.when(readyOps(Operation.Write)) {
                // use `channel` to write
              }
        } }
      }
    } yield ()
    matcher

    Function that is passed the ready operations set, and must return a partial function that handles whatever channel types are registered with the selector.

    returns

    The effect value returned by matcher, or a defect value if matcher did not match the selected channel.

  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def notInterested(op: Operation): UIO[Set[Operation]]
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def readyOps: UIO[Set[Operation]]
  30. final def selector: Selector
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    SelectionKey → AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped