Enum Class TransportKind

java.lang.Object
java.lang.Enum<TransportKind>
com.jsgalactic.axiom.lifecycle.TransportKind
All Implemented Interfaces:
Serializable, Comparable<TransportKind>, Constable

public enum TransportKind extends Enum<TransportKind>
The network I/O mechanism an HTTP listener uses, chosen with ListenerOptions.Builder.transport(TransportKind). Only the I/O mechanism differs: protocol behavior, limits and timeouts are the same for every kind.

The native kinds need the matching optional native library on the class path, which the installed transport lists in its documentation. A kind that is requested explicitly and is not usable makes the listener fail to start with an IllegalStateException; AUTO never fails for that reason.

  • Enum Constant Details

    • AUTO

      public static final TransportKind AUTO
      Uses a native transport when one is usable on this machine (EPOLL first, then IO_URING on Linux, then KQUEUE on macOS and the BSDs) and NIO otherwise. This is the default.
    • NIO

      public static final TransportKind NIO
      The JDK's selector-based I/O, available everywhere and needing no extra library.
    • EPOLL

      public static final TransportKind EPOLL
      Linux epoll through the transport's native library; requires Linux and that library.
    • KQUEUE

      public static final TransportKind KQUEUE
      BSD and macOS kqueue through the transport's native library; requires such a system and that library.
    • IO_URING

      public static final TransportKind IO_URING
      Linux io_uring through the transport's native library. Usable only where Netty's io_uring classes and native library are on the class path, the kernel supports io_uring, and the process is allowed to use it (container seccomp policies often block it). Applications opt in by adding netty-transport-native-io_uring with the platform classifier; AUTO selects this kind only when it is available and usable and no earlier native kind was selected.
  • Method Details

    • values

      public static TransportKind[] 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 TransportKind 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