public class SpdyFrameEncoder extends MessageToByteEncoder<SpdyFrame>
ByteBuf
.ChannelHandler.Sharable
Modifier | Constructor and Description |
---|---|
|
SpdyFrameEncoder(SpdyVersion version)
Creates a new instance with the specified
version and the
default compressionLevel (6) , windowBits (15) ,
and memLevel (8) . |
|
SpdyFrameEncoder(SpdyVersion version,
int compressionLevel,
int windowBits,
int memLevel)
Creates a new instance with the specified parameters.
|
protected |
SpdyFrameEncoder(SpdyVersion version,
io.netty.handler.codec.spdy.SpdyHeaderBlockEncoder headerBlockEncoder) |
Modifier and Type | Method and Description |
---|---|
protected void |
encode(ChannelHandlerContext ctx,
SpdyFrame msg,
ByteBuf out)
Encode a message into a
ByteBuf . |
void |
handlerAdded(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
acceptOutboundMessage, write
bind, close, connect, deregister, disconnect, flush, read
exceptionCaught, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionCaught, handlerRemoved
public SpdyFrameEncoder(SpdyVersion version)
version
and the
default compressionLevel (6)
, windowBits (15)
,
and memLevel (8)
.public SpdyFrameEncoder(SpdyVersion version, int compressionLevel, int windowBits, int memLevel)
protected SpdyFrameEncoder(SpdyVersion version, io.netty.handler.codec.spdy.SpdyHeaderBlockEncoder headerBlockEncoder)
public void handlerAdded(ChannelHandlerContext ctx) throws Exception
ChannelHandlerAdapter
handlerAdded
in interface ChannelHandler
handlerAdded
in class ChannelHandlerAdapter
Exception
protected void encode(ChannelHandlerContext ctx, SpdyFrame msg, ByteBuf out) throws Exception
MessageToByteEncoder
ByteBuf
. This method will be called for each written message that can be handled
by this encoder.encode
in class MessageToByteEncoder<SpdyFrame>
ctx
- the ChannelHandlerContext
which this MessageToByteEncoder
belongs tomsg
- the message to encodeout
- the ByteBuf
into which the encoded message will be writtenException
- is thrown if an error accourCopyright © 2008–2014 The Netty Project. All rights reserved.