public class NettyHelper extends Object
| 构造器和说明 |
|---|
NettyHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
closeClientIOEventGroup()
关闭客户端IO线程池
|
static void |
closeServerBossEventLoopGroup(ServerTransportConfig config)
关闭服务端Boss线程(只有最后一个使用者关闭才生效)
|
static void |
closeServerIoEventLoopGroup(ServerTransportConfig config)
关闭服务端IO线程(只有最后一个使用者关闭才生效)
|
static io.netty.buffer.ByteBuf |
getBuffer() |
static io.netty.buffer.ByteBuf |
getBuffer(int size) |
static io.netty.buffer.ByteBufAllocator |
getByteBufAllocator() |
static AbstractChannel |
getChannel(io.netty.channel.ChannelHandlerContext ctx) |
static io.netty.channel.EventLoopGroup |
getClientIOEventLoopGroup()
获取客户端IO线程池
|
static io.netty.channel.AdaptiveRecvByteBufAllocator |
getRecvByteBufAllocator() |
static io.netty.channel.EventLoopGroup |
getServerBizEventLoopGroup(ServerTransportConfig config,
Executor executor)
得到服务端业务线程池
|
static io.netty.channel.EventLoopGroup |
getServerBossEventLoopGroup(ServerTransportConfig config)
得到服务端Boss线程池
|
static io.netty.channel.EventLoopGroup |
getServerIoEventLoopGroup(ServerTransportConfig config)
得到服务端IO线程池
|
static String |
toString(io.netty.buffer.ByteBuf byteBuf) |
public static io.netty.channel.EventLoopGroup getServerBossEventLoopGroup(ServerTransportConfig config)
config - 服务端配置public static void closeServerBossEventLoopGroup(ServerTransportConfig config)
config - 服务端配置public static io.netty.channel.EventLoopGroup getServerIoEventLoopGroup(ServerTransportConfig config)
config - 服务端配置public static void closeServerIoEventLoopGroup(ServerTransportConfig config)
config - 服务端配置public static io.netty.channel.EventLoopGroup getClientIOEventLoopGroup()
public static void closeClientIOEventGroup()
public static io.netty.channel.EventLoopGroup getServerBizEventLoopGroup(ServerTransportConfig config, Executor executor)
config - 服务端配置executor - 业务线程池public static io.netty.buffer.ByteBufAllocator getByteBufAllocator()
public static io.netty.buffer.ByteBuf getBuffer()
public static io.netty.buffer.ByteBuf getBuffer(int size)
public static io.netty.channel.AdaptiveRecvByteBufAllocator getRecvByteBufAllocator()
public static AbstractChannel getChannel(io.netty.channel.ChannelHandlerContext ctx)
public static String toString(io.netty.buffer.ByteBuf byteBuf)
Copyright © 2008–2018 The Ant Financial. All rights reserved.