public class SpdyHttpDecoder extends OneToOneDecoder
SpdySynStreamFrame
s, SpdySynReplyFrame
s,
and SpdyDataFrame
s into HttpRequest
s and HttpResponse
s.ChannelHandler.Sharable
限定符 | 构造器和说明 |
---|---|
|
SpdyHttpDecoder(SpdyVersion spdyVersion,
int maxContentLength)
Creates a new instance.
|
protected |
SpdyHttpDecoder(SpdyVersion spdyVersion,
int maxContentLength,
java.util.Map<java.lang.Integer,HttpMessage> messageMap)
Creates a new instance with the specified parameters.
|
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.Object |
decode(ChannelHandlerContext ctx,
Channel channel,
java.lang.Object msg)
Transforms the specified received message into another message and return
the transformed message.
|
protected HttpMessage |
getMessage(int streamId) |
protected HttpMessage |
putMessage(int streamId,
HttpMessage message) |
protected HttpMessage |
removeMessage(int streamId) |
handleUpstream
public SpdyHttpDecoder(SpdyVersion spdyVersion, int maxContentLength)
spdyVersion
- the protocol versionmaxContentLength
- the maximum length of the message content.
If the length of the message content exceeds this value,
a TooLongFrameException
will be raised.protected SpdyHttpDecoder(SpdyVersion spdyVersion, int maxContentLength, java.util.Map<java.lang.Integer,HttpMessage> messageMap)
spdyVersion
- the protocol versionmaxContentLength
- the maximum length of the message content.
If the length of the message content exceeds this value,
a TooLongFrameException
will be raised.messageMap
- the Map
used to hold partially received messages.protected HttpMessage putMessage(int streamId, HttpMessage message)
protected HttpMessage getMessage(int streamId)
protected HttpMessage removeMessage(int streamId)
protected java.lang.Object decode(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg) throws java.lang.Exception
OneToOneDecoder
null
if the received message
is supposed to be discarded.decode
在类中 OneToOneDecoder
java.lang.Exception