@UnstableApi public class DefaultHttp2FrameReader extends Object implements Http2FrameReader, Http2FrameSizePolicy, Http2FrameReader.Configuration
Http2FrameReader that supports all frame types defined by the HTTP/2 specification.| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultHttp2FrameReader.HeadersBlockBuilder
Utility class to help with construction of the headers block that may potentially span
multiple frames.
|
Http2FrameReader.Configuration| Constructor and Description |
|---|
DefaultHttp2FrameReader()
Create a new instance.
|
DefaultHttp2FrameReader(boolean validateHeaders)
Create a new instance.
|
DefaultHttp2FrameReader(Http2HeadersDecoder headersDecoder) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this reader and frees any allocated resources.
|
Http2FrameReader.Configuration |
configuration()
Get the configuration related elements for this
Http2FrameReader |
Http2FrameSizePolicy |
frameSizePolicy()
Get the
Http2FrameSizePolicy for this Http2FrameReader |
Http2HeadersDecoder.Configuration |
headersConfiguration()
Get the
Http2HeadersDecoder.Configuration for this Http2FrameReader |
int |
maxFrameSize()
Gets the maximum allowed frame size.
|
void |
maxFrameSize(int max)
Sets the maximum allowed frame size.
|
void |
readFrame(ChannelHandlerContext ctx,
ByteBuf input,
Http2FrameListener listener)
Attempts to read the next frame from the input buffer.
|
public DefaultHttp2FrameReader()
Header names will be validated.
public DefaultHttp2FrameReader(boolean validateHeaders)
validateHeaders - true to validate headers. false to not validate headers.DefaultHttp2HeadersDecoder(boolean)public DefaultHttp2FrameReader(Http2HeadersDecoder headersDecoder)
public Http2HeadersDecoder.Configuration headersConfiguration()
Http2FrameReader.ConfigurationHttp2HeadersDecoder.Configuration for this Http2FrameReaderheadersConfiguration in interface Http2FrameReader.Configurationpublic Http2FrameReader.Configuration configuration()
Http2FrameReaderHttp2FrameReaderconfiguration in interface Http2FrameReaderpublic Http2FrameSizePolicy frameSizePolicy()
Http2FrameReader.ConfigurationHttp2FrameSizePolicy for this Http2FrameReaderframeSizePolicy in interface Http2FrameReader.Configurationpublic void maxFrameSize(int max)
throws Http2Exception
Http2FrameSizePolicy
This value is used to represent
SETTINGS_MAX_FRAME_SIZE. This method should
only be called by Netty (not users) as a result of a receiving a SETTINGS frame.
maxFrameSize in interface Http2FrameSizePolicyHttp2Exceptionpublic int maxFrameSize()
Http2FrameSizePolicy
This value is used to represent
SETTINGS_MAX_FRAME_SIZE. The initial value
defined by the RFC is unlimited but enforcing a lower limit is generally permitted.
Http2CodecUtil.DEFAULT_MAX_FRAME_SIZE can be used as a more conservative default.
maxFrameSize in interface Http2FrameSizePolicypublic void close()
Http2FrameReaderclose in interface Http2FrameReaderclose in interface Closeableclose in interface AutoCloseablepublic void readFrame(ChannelHandlerContext ctx, ByteBuf input, Http2FrameListener listener) throws Http2Exception
Http2FrameReaderreadFrame in interface Http2FrameReaderHttp2ExceptionCopyright © 2008–2017 The Netty Project. All rights reserved.