Package io.netty.handler.codec.spdy
Class SpdyHttpResponseStreamIdHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelDuplexHandler
-
- io.netty.handler.codec.MessageToMessageCodec<java.lang.Object,HttpMessage>
-
- io.netty.handler.codec.spdy.SpdyHttpResponseStreamIdHandler
-
- All Implemented Interfaces:
ChannelHandler
,ChannelInboundHandler
,ChannelOutboundHandler
public class SpdyHttpResponseStreamIdHandler extends MessageToMessageCodec<java.lang.Object,HttpMessage>
MessageToMessageCodec
that takes care of adding the rightSpdyHttpHeaders.Names.STREAM_ID
to theHttpMessage
if one is not present. This makes it possible to just re-use plan handlers current used for HTTP.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description SpdyHttpResponseStreamIdHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptInboundMessage(java.lang.Object msg)
Returnstrue
if and only if the specified message can be decoded by this codec.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)
-
Methods inherited from class io.netty.handler.codec.MessageToMessageCodec
acceptOutboundMessage, channelRead, channelReadComplete, write
-
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
-
-
-
Method Detail
-
acceptInboundMessage
public boolean acceptInboundMessage(java.lang.Object msg) throws java.lang.Exception
Description copied from class:MessageToMessageCodec
Returnstrue
if and only if the specified message can be decoded by this codec.- Overrides:
acceptInboundMessage
in classMessageToMessageCodec<java.lang.Object,HttpMessage>
- Parameters:
msg
- the message- Throws:
java.lang.Exception
-
encode
protected void encode(ChannelHandlerContext ctx, HttpMessage msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
- Specified by:
encode
in classMessageToMessageCodec<java.lang.Object,HttpMessage>
- Throws:
java.lang.Exception
- See Also:
MessageToMessageEncoder.encode(ChannelHandlerContext, Object, List)
-
decode
protected void decode(ChannelHandlerContext ctx, java.lang.Object msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
- Specified by:
decode
in classMessageToMessageCodec<java.lang.Object,HttpMessage>
- Throws:
java.lang.Exception
- See Also:
MessageToMessageDecoder.decode(ChannelHandlerContext, Object, List)
-
-