Enum Class NettyIoEngine
- All Implemented Interfaces:
Serializable,Comparable<NettyIoEngine>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends io.netty.channel.socket.ServerSocketChannel> channel()Returns theServerSocketChannelclass for this transport.static NettyIoEnginedetect()Detects the best available transport in priority order: io_uring > epoll > kqueue > NIO.io.netty.channel.IoHandlerFactoryReturns theIoHandlerFactoryfor this transport.static NettyIoEngineReturns the enum constant of this class with the specified name.static NettyIoEngine[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IO_URING
-
EPOLL
-
KQUEUE
-
NIO
-
AUTO
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
ioHandler
public io.netty.channel.IoHandlerFactory ioHandler()Returns theIoHandlerFactoryfor this transport.- Throws:
UnsupportedOperationException- if the transport classes are unavailable
-
channel
Returns theServerSocketChannelclass for this transport.- Throws:
UnsupportedOperationException- if the transport classes are unavailable
-
detect
Detects the best available transport in priority order: io_uring > epoll > kqueue > NIO.The result is cached after the first call.
-