Top Description Fields Constructors Methods
io.netty.handler.codec.spdy

public Class SpdyHttpResponseStreamIdHandler

extends MessageToMessageCodec<Object, HttpMessage>
Class Inheritance
Imports
io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.MessageToMessageCodec, io.netty.handler.codec.http.HttpMessage, io.netty.handler.codec.spdy.SpdyHttpHeaders.Names, io.netty.util.ReferenceCountUtil, java.util.ArrayDeque, .List, .Queue

MessageToMessageCodec that takes care of adding the right SpdyHttpHeaders.Names#STREAM_ID to the HttpMessage if one is not present. This makes it possible to just re-use plan handlers current used for HTTP.

Field Summary

Modifier and TypeField and Description
private final Queue<Integer>
private static final Integer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
acceptInboundMessage(Object
the message
msg
)

Overrides io.netty.handler.codec.MessageToMessageCodec.acceptInboundMessage.

Returns true if and only if the specified message can be decoded by this codec.
protected void
protected void
Inherited from io.netty.handler.codec.MessageToMessageCodec:
acceptOutboundMessagechannelReadwrite

Field Detail

idsback to summary
private final Queue<Integer> ids
NO_IDback to summary
private static final Integer NO_ID

Constructor Detail

SpdyHttpResponseStreamIdHandlerback to summary
public SpdyHttpResponseStreamIdHandler()

Method Detail

acceptInboundMessageback to summary
public boolean acceptInboundMessage(Object msg) throws Exception

Overrides io.netty.handler.codec.MessageToMessageCodec.acceptInboundMessage.

Doc from io.netty.handler.codec.MessageToMessageCodec.acceptInboundMessage.

Returns true if and only if the specified message can be decoded by this codec.

Parameters
msg:Object

the message

Annotations
@Override
decodeback to summary
protected void decode(ChannelHandlerContext ctx, Object msg, List<Object> out) throws Exception

Implements abstract io.netty.handler.codec.MessageToMessageCodec.decode.

Annotations
@Override
encodeback to summary
protected void encode(ChannelHandlerContext ctx, HttpMessage msg, List<Object> out) throws Exception

Implements abstract io.netty.handler.codec.MessageToMessageCodec.encode.

Annotations
@Override