类 PortUnificationHandshake
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.ByteToMessageDecoder
-
- xin.alum.aio.server.PortUnificationHandshake
-
- 所有已实现的接口:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class PortUnificationHandshake extends io.netty.handler.codec.ByteToMessageDecoder统一端口服务处理器[协议握手] 注意:不能设置为Share使用同一个端口去处理TCP/HTTP协议的请求,因为HTTP的底层协议也是TCP,因此可以在此处理器内部可以通过解析部分数据 来判断请求是TCP请求还是HTTP请求,然使用动态的pipeline切换
- 作者:
- Succy create on 2020/11/19
-
-
字段概要
字段 修饰符和类型 字段 说明 protected io.netty.util.internal.logging.InternalLoggerlogger
-
构造器概要
构造器 构造器 说明 PortUnificationHandshake()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voiddecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out)voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)-
从类继承的方法 io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
-
从类继承的方法 io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged
-
-
-
-
方法详细资料
-
decode
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out)- 指定者:
decode在类中io.netty.handler.codec.ByteToMessageDecoder
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)- 指定者:
exceptionCaught在接口中io.netty.channel.ChannelHandler- 指定者:
exceptionCaught在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
exceptionCaught在类中io.netty.channel.ChannelInboundHandlerAdapter
-
-