public class SpdyHttpDecoder extends MessageToMessageDecoder<SpdyFrame>
ChannelHandler.Sharable| Modifier | Constructor and Description |
|---|---|
|
SpdyHttpDecoder(SpdyVersion version, int maxContentLength)
创建一个新的实例。
|
|
SpdyHttpDecoder(SpdyVersion version, int maxContentLength, boolean validateHeaders)
创建一个新的实例。
|
protected |
SpdyHttpDecoder(SpdyVersion version, int maxContentLength, java.util.Map<java.lang.Integer,FullHttpMessage> messageMap)
用指定的参数创建一个新的实例。
|
protected |
SpdyHttpDecoder(SpdyVersion version, int maxContentLength, java.util.Map<java.lang.Integer,FullHttpMessage> messageMap, boolean validateHeaders)
用指定的参数创建一个新的实例。
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(ChannelHandlerContext ctx)
|
protected void |
decode(ChannelHandlerContext ctx, SpdyFrame msg, java.util.List<java.lang.Object> out)
从一条消息解码到另一条消息。
|
protected FullHttpMessage |
getMessage(int streamId) |
protected FullHttpMessage |
putMessage(int streamId, FullHttpMessage message) |
protected FullHttpMessage |
removeMessage(int streamId) |
acceptInboundMessage, channelReadchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded, handlerRemovedpublic SpdyHttpDecoder(SpdyVersion version, int maxContentLength)
version - 协议版本
maxContentLength - 消息内容的最大长度。
如果消息内容的长度超过此值,则会引发TooLongFrameException 。
public SpdyHttpDecoder(SpdyVersion version, int maxContentLength, boolean validateHeaders)
version - 协议版本
maxContentLength - 消息内容的最大长度。
如果消息内容的长度超过此值,则会引发TooLongFrameException 。
validateHeaders -
true如果http标头应该被验证
protected SpdyHttpDecoder(SpdyVersion version, int maxContentLength, java.util.Map<java.lang.Integer,FullHttpMessage> messageMap)
version - 协议版本
maxContentLength - 消息内容的最大长度。
如果消息内容的长度超过此值,则会引发TooLongFrameException 。
messageMap -
Map用于保存部分接收的消息。
protected SpdyHttpDecoder(SpdyVersion version, int maxContentLength, java.util.Map<java.lang.Integer,FullHttpMessage> messageMap, boolean validateHeaders)
version - 协议版本
maxContentLength - 消息内容的最大长度。
如果消息内容的长度超过此值,则会引发TooLongFrameException 。
messageMap -
Map用于保存部分接收的消息。
validateHeaders -
true如果http标头应该被验证
public void channelInactive(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelInboundHandlerAdapter
ChannelHandlerContext.fireChannelInactive()转发到ChannelPipeline中的下一个ChannelInboundHandler 。
子类可以重写此方法来更改行为。
channelInactive在界面
ChannelInboundHandler
channelInactive在课堂上
ChannelInboundHandlerAdapter
java.lang.Exception
protected FullHttpMessage putMessage(int streamId, FullHttpMessage message)
protected FullHttpMessage getMessage(int streamId)
protected FullHttpMessage removeMessage(int streamId)
protected void decode(ChannelHandlerContext ctx, SpdyFrame msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageDecoder
decode在课堂上
MessageToMessageDecoder<SpdyFrame>
ctx - MessageToMessageDecoder属于的ChannelHandlerContext
msg - 解码到另一个的消息
out - 应该添加解码消息的
List
java.lang.Exception - 发生错误时抛出
Copyright © 2008–2018 The Netty Project. All rights reserved.