public class NettyUtils extends Object
| Constructor and Description | 
|---|
NettyUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static int | 
getClientReachableLocalInetAddressCount()
Attempts to detect and return the number of local network addresses that could be
 used by a client to reach this server. 
 | 
static io.netty.channel.EventLoopGroup | 
newNioOrEpollEventLoopGroup()
If  
Epoll.isAvailable() == true, returns a new
 EpollEventLoopGroup, otherwise returns a new
 NioEventLoopGroup. | 
static io.netty.channel.EventLoopGroup | 
newNioOrEpollEventLoopGroup(int nThreads)
If  
Epoll.isAvailable() == true, returns a new
 EpollEventLoopGroup, otherwise returns a new
 NioEventLoopGroup. | 
static Class<? extends io.netty.channel.socket.ServerSocketChannel> | 
nioOrEpollServerSocketChannel()
If  
Epoll.isAvailable() == true, returns
 EpollServerSocketChannel, otherwise returns
 NioServerSocketChannel. | 
static Class<? extends io.netty.channel.socket.SocketChannel> | 
nioOrEpollSocketChannel()
If  
Epoll.isAvailable() == true, returns
 EpollSocketChannel, otherwise returns NioSocketChannel. | 
public static io.netty.channel.EventLoopGroup newNioOrEpollEventLoopGroup()
Epoll.isAvailable() == true, returns a new
 EpollEventLoopGroup, otherwise returns a new
 NioEventLoopGroup. Creates the event loop group using the
 default number of threads.EventLoopGroup.public static io.netty.channel.EventLoopGroup newNioOrEpollEventLoopGroup(int nThreads)
Epoll.isAvailable() == true, returns a new
 EpollEventLoopGroup, otherwise returns a new
 NioEventLoopGroup. Creates the event loop group using the
 specified number of threads instead of the default.nThreads - see NioEventLoopGroup.NioEventLoopGroup(int).EventLoopGroup.public static Class<? extends io.netty.channel.socket.SocketChannel> nioOrEpollSocketChannel()
Epoll.isAvailable() == true, returns
 EpollSocketChannel, otherwise returns NioSocketChannel.public static Class<? extends io.netty.channel.socket.ServerSocketChannel> nioOrEpollServerSocketChannel()
Epoll.isAvailable() == true, returns
 EpollServerSocketChannel, otherwise returns
 NioServerSocketChannel.public static int getClientReachableLocalInetAddressCount()
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.