Interface EventLoopGroupFactory

All Known Implementing Classes:
DefaultEventLoopGroupFactory, EpollEventLoopGroupFactory, IoUringEventLoopGroupFactory, KQueueEventLoopGroupFactory, NioEventLoopGroupFactory

public interface EventLoopGroupFactory
Factory for EventLoopGroup.
Since:
1.2.0
Author:
croudet, graemerocher
  • Field Details

  • Method Details

    • isNative

      default boolean isNative()
      Returns:
      Is this a native factory.
    • createEventLoopGroup

      io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, Executor executor, @Nullable @Nullable Integer ioRatio)
      Creates an EventLoopGroup.
      Parameters:
      threads - The number of threads to use.
      executor - An Executor.
      ioRatio - The io ratio.
      Returns:
      An EventLoopGroup.
    • createEventLoopGroup

      default io.netty.channel.EventLoopGroup createEventLoopGroup(EventLoopGroupConfiguration configuration, ThreadFactory threadFactory)
      Create an event loop group for the given configuration and thread factory.
      Parameters:
      configuration - The configuration
      threadFactory - The thread factory
      Returns:
      The event loop group
    • createEventLoopGroup

      io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, @Nullable @Nullable ThreadFactory threadFactory, @Nullable @Nullable Integer ioRatio)
      Creates an EventLoopGroup.
      Parameters:
      threads - The number of threads to use.
      threadFactory - The thread factory.
      ioRatio - The io ratio.
      Returns:
      An EventLoopGroup.
    • createEventLoopGroup

      default io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, @Nullable @Nullable Integer ioRatio)
      Creates an EventLoopGroup.
      Parameters:
      threads - The number of threads to use.
      ioRatio - The io ratio.
      Returns:
      An EventLoopGroup.
    • serverSocketChannelClass

      @NonNull @NonNull Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass()
      Returns the server channel class.
      Returns:
      A ServerChannelClass.
    • domainServerSocketChannelClass

      @NonNull default @NonNull Class<? extends io.netty.channel.unix.ServerDomainSocketChannel> domainServerSocketChannelClass() throws UnsupportedOperationException
      Returns the domain socket server channel class.
      Returns:
      A ServerDomainSocketChannel class.
      Throws:
      UnsupportedOperationException - if domain sockets are not supported.
    • channelClass

      @NonNull default @NonNull Class<? extends io.netty.channel.Channel> channelClass(NettyChannelType type) throws UnsupportedOperationException
      Returns the domain socket server channel class.
      Parameters:
      type - Type of the channel to return
      Returns:
      A channel class.
      Throws:
      UnsupportedOperationException - if domain sockets are not supported.
    • serverSocketChannelClass

      @NonNull default @NonNull Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass(@Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the server channel class.
      Parameters:
      configuration - The configuration
      Returns:
      A ServerSocketChannel class.
    • domainServerSocketChannelClass

      @NonNull default @NonNull Class<? extends io.netty.channel.unix.ServerDomainSocketChannel> domainServerSocketChannelClass(@Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the domain socket server channel class.
      Parameters:
      configuration - The configuration
      Returns:
      A ServerDomainSocketChannel implementation.
      Throws:
      UnsupportedOperationException - if domain sockets are not supported.
    • channelClass

      @NonNull default @NonNull Class<? extends io.netty.channel.Channel> channelClass(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the domain socket server channel class.
      Parameters:
      type - Type of the channel to return
      configuration - The configuration
      Returns:
      A channel implementation.
      Throws:
      UnsupportedOperationException - if domain sockets are not supported.
    • serverSocketChannelInstance

      @NonNull default @NonNull io.netty.channel.socket.ServerSocketChannel serverSocketChannelInstance(@Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the server channel class instance.
      Parameters:
      configuration - The configuration
      Returns:
      A ServerSocketChannel instance.
    • domainServerSocketChannelInstance

      @NonNull default @NonNull io.netty.channel.ServerChannel domainServerSocketChannelInstance(@Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the domain socket server channel class.
      Parameters:
      configuration - The configuration
      Returns:
      A ServerDomainSocketChannel implementation.
      Throws:
      UnsupportedOperationException - if domain sockets are not supported.
    • channelInstance

      @NonNull default @NonNull io.netty.channel.Channel channelInstance(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the domain socket server channel class.
      Parameters:
      type - Type of the channel to return
      configuration - The configuration
      Returns:
      A ServerDomainSocketChannel implementation.
      Throws:
      UnsupportedOperationException - if domain sockets are not supported.
    • channelInstance

      @NonNull default @NonNull io.netty.channel.Channel channelInstance(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration, int fd)
      Returns the channel instance.
      Parameters:
      type - Type of the channel to return
      configuration - The configuration
      fd - The pre-defined file descriptor
      Returns:
      A channel implementation.
      Throws:
      UnsupportedOperationException - if domain sockets are not supported.
    • clientSocketChannelClass

      @NonNull @NonNull Class<? extends io.netty.channel.socket.SocketChannel> clientSocketChannelClass(@Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the client channel class.
      Parameters:
      configuration - The configuration
      Returns:
      A SocketChannel class.
    • clientSocketChannelInstance

      @NonNull default @NonNull io.netty.channel.socket.SocketChannel clientSocketChannelInstance(@Nullable @Nullable EventLoopGroupConfiguration configuration)
      Returns the client channel class instance.
      Parameters:
      configuration - The configuration
      Returns:
      A SocketChannel instance.