public class SpdyHttpDecoder extends MessageToMessageDecoder<SpdyFrame>
SpdySynStreamFrame
s, SpdySynReplyFrame
s,
and SpdyDataFrame
s into FullHttpRequest
s and FullHttpResponse
s.ChannelHandler.Sharable, ChannelHandler.Skip
Modifier | Constructor and Description |
---|---|
|
SpdyHttpDecoder(SpdyVersion version,
int maxContentLength)
Creates a new instance.
|
|
SpdyHttpDecoder(SpdyVersion version,
int maxContentLength,
boolean validateHeaders)
Creates a new instance.
|
protected |
SpdyHttpDecoder(SpdyVersion version,
int maxContentLength,
Map<Integer,FullHttpMessage> messageMap)
Creates a new instance with the specified parameters.
|
protected |
SpdyHttpDecoder(SpdyVersion version,
int maxContentLength,
Map<Integer,FullHttpMessage> messageMap,
boolean validateHeaders)
Creates a new instance with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
protected void |
decode(ChannelHandlerContext ctx,
SpdyFrame msg,
List<Object> out)
Decode from one message to an other.
|
protected FullHttpMessage |
getMessage(int streamId) |
protected FullHttpMessage |
putMessage(int streamId,
FullHttpMessage message) |
protected FullHttpMessage |
removeMessage(int streamId) |
acceptInboundMessage, channelRead
bind, channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, isSharable, read, userEventTriggered, write
public SpdyHttpDecoder(SpdyVersion version, int maxContentLength)
version
- 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.public SpdyHttpDecoder(SpdyVersion version, int maxContentLength, boolean validateHeaders)
version
- 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.validateHeaders
- true
if http headers should be validatedprotected SpdyHttpDecoder(SpdyVersion version, int maxContentLength, Map<Integer,FullHttpMessage> messageMap)
version
- 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 SpdyHttpDecoder(SpdyVersion version, int maxContentLength, Map<Integer,FullHttpMessage> messageMap, boolean validateHeaders)
version
- 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.validateHeaders
- true
if http headers should be validatedprotected FullHttpMessage putMessage(int streamId, FullHttpMessage message)
protected FullHttpMessage getMessage(int streamId)
protected FullHttpMessage removeMessage(int streamId)
protected void decode(ChannelHandlerContext ctx, SpdyFrame msg, List<Object> out) throws Exception
MessageToMessageDecoder
decode
in class MessageToMessageDecoder<SpdyFrame>
ctx
- the ChannelHandlerContext
which this MessageToMessageDecoder
belongs tomsg
- the message to decode to an other oneout
- the List
to which decoded messages should be addedException
- is thrown if an error accourCopyright © 2008–2015 The Netty Project. All rights reserved.