code: public static Class<? extends ServerChannel> getServerChannelClass(IOMode mode) {
      switch (mode) {
        case NIO:
          return NioServerSocketChannel.class;
        case EPOLL:
          return EpollServerSocketChannel.class;
        default:
          throw new IllegalArgumentException("Unknown io mode: " + mode);
      }
    }
docs: Returns the correct ServerSocketChannel class based on IOMode.