Enum Class NettyIoEngine

java.lang.Object
java.lang.Enum<NettyIoEngine>
dev.tachyonmcp.core.transport.netty.NettyIoEngine
All Implemented Interfaces:
Serializable, Comparable<NettyIoEngine>, Constable

public enum NettyIoEngine extends Enum<NettyIoEngine>
A Netty I/O transport engine — pairs an IoHandlerFactory with a ServerSocketChannel class.

Native transports (IO_URING, EPOLL, KQUEUE) are resolved via Netty's own isAvailable() detectors (reflective) so that the netty-transport-classes-* JARs are needed only at runtime.

Use detect() for the best available transport, or set an explicit engine.

  • Enum Constant Details

  • Method Details

    • values

      public static NettyIoEngine[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NettyIoEngine valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • ioHandler

      public io.netty.channel.IoHandlerFactory ioHandler()
      Returns the IoHandlerFactory for this transport.
      Throws:
      UnsupportedOperationException - if the transport classes are unavailable
    • channel

      public Class<? extends io.netty.channel.socket.ServerSocketChannel> channel()
      Returns the ServerSocketChannel class for this transport.
      Throws:
      UnsupportedOperationException - if the transport classes are unavailable
    • detect

      public static NettyIoEngine detect()
      Detects the best available transport in priority order: io_uring > epoll > kqueue > NIO.

      The result is cached after the first call.