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, writebind, close, connect, deregister, disconnect, flush, readchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexceptionCaught, handlerAdded, handlerRemovedpublic 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.