Package io.netty.handler.codec.http2
Class DelegatingDecompressorFrameListener.Http2Decompressor
- java.lang.Object
-
- io.netty.handler.codec.http2.DelegatingDecompressorFrameListener.Http2Decompressor
-
- Enclosing class:
- DelegatingDecompressorFrameListener
private static final class DelegatingDecompressorFrameListener.Http2Decompressor extends java.lang.ObjectProvides the state for streamDATAframe decompression.
-
-
Field Summary
Fields Modifier and Type Field Description private intcompressedprivate booleandataDecompressedprivate intdecompressedprivate EmbeddedChanneldecompressorprivate intpaddingprivate Http2Streamstreamprivate ChannelHandlerContexttargetCtx
-
Constructor Summary
Constructors Constructor Description Http2Decompressor(EmbeddedChannel decompressor, Http2Connection connection, Http2FrameListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidcleanup()Release remaining content from theEmbeddedChannel.(package private) intconsumeBytes(int streamId, int decompressedBytes)Determines the ratio betweennumBytesanddecompressed.(package private) intdecompress(ChannelHandlerContext ctx, Http2Stream stream, ByteBuf data, int padding, boolean endOfStream)private voidincrementCompressedBytes(int delta)Increment the number of bytes received prior to doing any decompression.private voidincrementDecompressedBytes(int delta)Increment the number of bytes after the decompression process.
-
-
-
Field Detail
-
decompressor
private final EmbeddedChannel decompressor
-
compressed
private int compressed
-
decompressed
private int decompressed
-
stream
private Http2Stream stream
-
padding
private int padding
-
dataDecompressed
private boolean dataDecompressed
-
targetCtx
private ChannelHandlerContext targetCtx
-
-
Constructor Detail
-
Http2Decompressor
Http2Decompressor(EmbeddedChannel decompressor, Http2Connection connection, Http2FrameListener listener)
-
-
Method Detail
-
cleanup
void cleanup()
Release remaining content from theEmbeddedChannel.
-
decompress
int decompress(ChannelHandlerContext ctx, Http2Stream stream, ByteBuf data, int padding, boolean endOfStream) throws Http2Exception
- Throws:
Http2Exception
-
incrementCompressedBytes
private void incrementCompressedBytes(int delta)
Increment the number of bytes received prior to doing any decompression.
-
incrementDecompressedBytes
private void incrementDecompressedBytes(int delta)
Increment the number of bytes after the decompression process.
-
consumeBytes
int consumeBytes(int streamId, int decompressedBytes) throws Http2ExceptionDetermines the ratio betweennumBytesanddecompressed. This ratio is used to decrementdecompressedandcompressed.- Parameters:
streamId- the stream IDdecompressedBytes- The number of post-decompressed bytes to return to flow control- Returns:
- The number of pre-decompressed bytes that have been consumed.
- Throws:
Http2Exception
-
-