Interface StreamDecoderFactory
- All Superinterfaces:
StreamDecoderFactory
An interface that constructs a new
StreamDecoder
for a given Content-Encoding header value.
A new decoder is valid for the lifetime of an HttpMessage
.-
Method Summary
Modifier and TypeMethodDescriptionstatic List<StreamDecoderFactory>
all()
Returns all availableStreamDecoderFactory
s.static StreamDecoderFactory
brotli()
Returns theStreamDecoderFactory
for"br"
content encoding.static StreamDecoderFactory
deflate()
Returns theStreamDecoderFactory
for"deflate"
content encoding.Returns the value of the Content-Encoding header which this factory applies to.static StreamDecoderFactory
gzip()
Returns theStreamDecoderFactory
for"gzip"
content encoding.default StreamDecoder
newDecoder
(io.netty.buffer.ByteBufAllocator alloc) Construct a newStreamDecoder
to use to decode anHttpMessage
.newDecoder
(io.netty.buffer.ByteBufAllocator alloc, int maxLength) Construct a newStreamDecoder
to use to decode anHttpMessage
.static StreamDecoderFactory
snappy()
Returns theStreamDecoderFactory
for "x-snappy-framed" content encoding.
-
Method Details
-
all
Returns all availableStreamDecoderFactory
s. -
deflate
Returns theStreamDecoderFactory
for"deflate"
content encoding. -
gzip
Returns theStreamDecoderFactory
for"gzip"
content encoding. -
brotli
Returns theStreamDecoderFactory
for"br"
content encoding. -
snappy
Returns theStreamDecoderFactory
for "x-snappy-framed" content encoding. -
encodingHeaderValue
String encodingHeaderValue()Returns the value of the Content-Encoding header which this factory applies to.- Specified by:
encodingHeaderValue
in interfaceStreamDecoderFactory
-
newDecoder
Construct a newStreamDecoder
to use to decode anHttpMessage
.- Specified by:
newDecoder
in interfaceStreamDecoderFactory
- Parameters:
alloc
- theByteBufAllocator
to allocate a newByteBuf
for the decodedHttpMessage
.
-
newDecoder
Construct a newStreamDecoder
to use to decode anHttpMessage
.- Specified by:
newDecoder
in interfaceStreamDecoderFactory
- Parameters:
alloc
- theByteBufAllocator
to allocate a newByteBuf
for the decodedHttpMessage
.maxLength
- the maximum allowed length of a decoded content. If the total length of the decoded content exceedsmaxLength
, aContentTooLargeException
will be raised.
-