public final class NettyUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static io.netty.channel.EventLoopGroup |
createEventLoop(ChannelType type,
int numThreads,
String threadPrefix,
boolean isDaemon)
Creates a Netty EventLoopGroup based on ChannelType.
|
static Class<? extends io.netty.channel.socket.SocketChannel> |
getClientChannelClass(ChannelType type)
Returns the correct SocketChannel class based on ChannelType.
|
static Class<? extends io.netty.channel.ServerChannel> |
getServerChannelClass(ChannelType type)
Returns the correct ServerSocketChannel class based on ChannelType.
|
public static io.netty.channel.EventLoopGroup createEventLoop(ChannelType type, int numThreads, String threadPrefix, boolean isDaemon)
type - Selector for which form of low-level IO we should usenumThreads - target number of threadsthreadPrefix - name pattern for each thread. should contain '%d' to distinguish between
threads.isDaemon - if true, the ThreadFactory will create daemon
threads.public static Class<? extends io.netty.channel.ServerChannel> getServerChannelClass(ChannelType type)
type - Selector for which form of low-level IO we should usepublic static Class<? extends io.netty.channel.socket.SocketChannel> getClientChannelClass(ChannelType type)
type - Selector for which form of low-level IO we should useCopyright © 2015. All Rights Reserved.