public class SpdyHttpResponseStreamIdHandler extends MessageToMessageCodec<java.lang.Object,HttpMessage>
MessageToMessageCodec
负责将正确的SpdyHttpHeaders.Names.STREAM_ID
添加到HttpMessage
(如果不存在)。
这使得重新使用当前用于HTTP的计划处理程序成为可能。
ChannelHandler.Sharable
Constructor and Description |
---|
SpdyHttpResponseStreamIdHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptInboundMessage(java.lang.Object msg)
当且仅当指定的消息可以被该编解码器解码时返回
true 。
|
protected void |
decode(ChannelHandlerContext ctx, java.lang.Object msg, java.util.List<java.lang.Object> out) |
protected void |
encode(ChannelHandlerContext ctx, HttpMessage msg, java.util.List<java.lang.Object> out) |
acceptOutboundMessage, channelRead, write
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionCaught, handlerAdded, handlerRemoved
public boolean acceptInboundMessage(java.lang.Object msg) throws java.lang.Exception
MessageToMessageCodec
true
。
acceptInboundMessage
在课堂上
MessageToMessageCodec<java.lang.Object,HttpMessage>
msg
- 消息
java.lang.Exception
protected void encode(ChannelHandlerContext ctx, HttpMessage msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
encode
在课堂上
MessageToMessageCodec<java.lang.Object,HttpMessage>
java.lang.Exception
MessageToMessageEncoder.encode(ChannelHandlerContext, Object, List)
protected void decode(ChannelHandlerContext ctx, java.lang.Object msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
decode
在课堂上
MessageToMessageCodec<java.lang.Object,HttpMessage>
java.lang.Exception
MessageToMessageDecoder.decode(ChannelHandlerContext, Object, List)
Copyright © 2008–2018 The Netty Project. All rights reserved.