Class SpdyHttpDecoder
java.lang.Object
org.jboss.netty.handler.codec.oneone.OneToOneDecoder
org.jboss.netty.handler.codec.spdy.SpdyHttpDecoder
- All Implemented Interfaces:
ChannelHandler,ChannelUpstreamHandler
Decodes
SpdySynStreamFrames, SpdySynReplyFrames,
and SpdyDataFrames into HttpRequests and HttpResponses.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable -
Constructor Summary
ConstructorsModifierConstructorDescriptionSpdyHttpDecoder(SpdyVersion spdyVersion, int maxContentLength) Creates a new instance.protectedSpdyHttpDecoder(SpdyVersion spdyVersion, int maxContentLength, Map<Integer, HttpMessage> messageMap) Creates a new instance with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectdecode(ChannelHandlerContext ctx, Channel channel, Object msg) Transforms the specified received message into another message and return the transformed message.protected HttpMessagegetMessage(int streamId) protected HttpMessageputMessage(int streamId, HttpMessage message) protected HttpMessageremoveMessage(int streamId) Methods inherited from class org.jboss.netty.handler.codec.oneone.OneToOneDecoder
handleUpstream
-
Constructor Details
-
SpdyHttpDecoder
Creates a new instance.- Parameters:
spdyVersion- the protocol versionmaxContentLength- the maximum length of the message content. If the length of the message content exceeds this value, aTooLongFrameExceptionwill be raised.
-
SpdyHttpDecoder
protected SpdyHttpDecoder(SpdyVersion spdyVersion, int maxContentLength, Map<Integer, HttpMessage> messageMap) Creates a new instance with the specified parameters.- Parameters:
spdyVersion- the protocol versionmaxContentLength- the maximum length of the message content. If the length of the message content exceeds this value, aTooLongFrameExceptionwill be raised.messageMap- theMapused to hold partially received messages.
-
-
Method Details
-
putMessage
-
getMessage
-
removeMessage
-
decode
Description copied from class:OneToOneDecoderTransforms the specified received message into another message and return the transformed message. Returnnullif the received message is supposed to be discarded.- Specified by:
decodein classOneToOneDecoder- Throws:
Exception
-