@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.Configuration
Http2HeadersDecoder.Configuration
for this Http2FrameReader
headersConfiguration
in interface Http2FrameReader.Configuration
public Http2FrameReader.Configuration configuration()
Http2FrameReader
Http2FrameReader
configuration
in interface Http2FrameReader
public Http2FrameSizePolicy frameSizePolicy()
Http2FrameReader.Configuration
Http2FrameSizePolicy
for this Http2FrameReader
frameSizePolicy
in interface Http2FrameReader.Configuration
public 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 Http2FrameSizePolicy
Http2Exception
public 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 Http2FrameSizePolicy
public void close()
Http2FrameReader
close
in interface Http2FrameReader
close
in interface Closeable
close
in interface AutoCloseable
public void readFrame(ChannelHandlerContext ctx, ByteBuf input, Http2FrameListener listener) throws Http2Exception
Http2FrameReader
readFrame
in interface Http2FrameReader
Http2Exception
Copyright © 2008–2017 The Netty Project. All rights reserved.