Http2ConnectionHandler instances.
Http2ConnectionHandlerHttp2ConnectionHandlerbuild() to build a new
Http2ConnectionHandler. Setting the following properties are prohibited because they are used for
other ways of building a Http2ConnectionHandler.
conflicts with this option:
Http2ConnectionHandler you specifiedconnection(Http2Connection) to tell the builder that you want to build the handler from the
Http2Connection you specified. Setting the following properties are prohibited and thus will trigger
an IllegalStateException because they conflict with this option.
Http2ConnectionDecoder and Http2ConnectionEncoder you specifiedcodec(Http2ConnectionDecoder, Http2ConnectionEncoder) to tell the builder that you want to built the
handler from the Http2ConnectionDecoder and Http2ConnectionEncoder you specified. Setting the
following properties are prohibited and thus will trigger an IllegalStateException because they conflict
with this option:
server(boolean)connection(Http2Connection)frameLogger(Http2FrameLogger)headerSensitivityDetector(SensitivityDetector)encoderEnforceMaxConcurrentStreams(boolean)encoderIgnoreMaxHeaderListSize(boolean)build() method and all property access methods are protected. Choose the methods to expose to the
users of your builder implementation and make them public.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private Http2Connection | |
| private Http2ConnectionDecoder | |
| private boolean | |
| private static final Http2HeadersEncoder. | |
| private static final int | |
| private Http2ConnectionEncoder | |
| private Boolean | |
| private Boolean | |
| private boolean | |
| private Http2FrameListener | |
| private Http2FrameLogger | |
| private long | |
| private Http2HeadersEncoder. | |
| private Http2Settings | |
| private Boolean | |
| private int | |
| private int | |
| private Integer | |
| private Integer | |
| private Http2PromisedRequestVerifier | |
| private int | |
| private Boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected B | Returns: this.Determine if PING frame should automatically be acknowledged or not. |
| protected B | Returns: this.Determine if settings frame should automatically be acknowledged and applied. |
| protected T | |
| protected abstract T | build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
Implement this method to create a new |
| private T | |
| private T | |
| protected B | codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
Sets the |
| protected Http2Connection | |
| protected B | |
| protected Http2ConnectionDecoder | |
| protected int | decoderEnforceMaxConsecutiveEmptyDataFrames()
Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed. |
| protected B | decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)
Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed. |
| protected B | decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
Sets the maximum number RST frames that are allowed per window before the connection is closed. |
| protected B | Returns: this.true to make Channel#close() directly close the underlying
transport, and not attempt graceful closure via GOAWAY.Determine if the |
| protected boolean | decoupleCloseAndGoAway()
Determine if the |
| protected Http2ConnectionEncoder | |
| protected boolean | encoderEnforceMaxConcurrentStreams()
Returns if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded. |
| protected B | encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded. |
| protected int | encoderEnforceMaxQueuedControlFrames()
Returns the maximum number of queued control frames that are allowed before the connection is closed. |
| protected B | encoderEnforceMaxQueuedControlFrames(int maxQueuedControlFrames)
Sets the maximum number of queued control frames that are allowed before the connection is closed. |
| protected B | Returns: this.true to ignore
SETTINGS_MAX_HEADER_LIST_SIZE.Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers. |
| private static void | |
| private void | |
| protected B | Returns: this.true to automatically flush, false otherwise.Determine if the Preface
should be automatically flushed when the |
| protected boolean | Returns: true if automatically flushed.Determine if the Preface
should be automatically flushed when the |
| protected Http2FrameListener | |
| protected B | |
| protected Http2FrameLogger | |
| protected B | |
| protected long | gracefulShutdownTimeoutMillis()
Returns the graceful shutdown timeout of the |
| protected B | gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Sets the graceful shutdown timeout of the |
| protected Http2HeadersEncoder. | |
| protected B | headerSensitivityDetector(Http2HeadersEncoder.
Sets the |
| protected B | initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
Deprecated
Huffman decoding no longer depends on having a decode capacity.
Does nothing, do not call.
|
| protected Http2Settings | |
| protected B | initialSettings(Http2Settings settings)
Sets the |
| protected boolean | Returns: true if the PING frames should be automatically acknowledged.Determine if the PING frames should be automatically acknowledged or not. |
| protected boolean | Returns: true if the SETTINGS frames should be automatically acknowledged and applied.Determine if the SETTINGS frames should be automatically acknowledged and applied. |
| protected boolean | isServer()
Returns if |
| protected boolean | |
| protected int | maxReservedStreams()
Get the maximum number of streams which can be in the reserved state at any given time. |
| protected B | maxReservedStreams(int maxReservedStreams)
Set the maximum number of streams which can be in the reserved state at any given time. |
| protected B | Returns: this.Set the |
| protected Http2PromisedRequestVerifier | Returns: theHttp2PromisedRequestVerifier to use.Get the |
| protected final B | |
| protected B | server(boolean isServer)
Sets if |
| protected B | validateHeaders(boolean validateHeaders)
Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6. |
| autoAckPingFrame | back to summary |
|---|---|
| private boolean autoAckPingFrame | |
| autoAckSettingsFrame | back to summary |
|---|---|
| private boolean autoAckSettingsFrame | |
| connection | back to summary |
|---|---|
| private Http2Connection connection | |
| decoder | back to summary |
|---|---|
| private Http2ConnectionDecoder decoder | |
| decoupleCloseAndGoAway | back to summary |
|---|---|
| private boolean decoupleCloseAndGoAway | |
| DEFAULT_HEADER_SENSITIVITY_DETECTOR | back to summary |
|---|---|
| private static final Http2HeadersEncoder. | |
| DEFAULT_MAX_RST_FRAMES_PER_CONNECTION_FOR_SERVER | back to summary |
|---|---|
| private static final int DEFAULT_MAX_RST_FRAMES_PER_CONNECTION_FOR_SERVER | |
| encoder | back to summary |
|---|---|
| private Http2ConnectionEncoder encoder | |
| encoderEnforceMaxConcurrentStreams | back to summary |
|---|---|
| private Boolean encoderEnforceMaxConcurrentStreams | |
| encoderIgnoreMaxHeaderListSize | back to summary |
|---|---|
| private Boolean encoderIgnoreMaxHeaderListSize | |
| flushPreface | back to summary |
|---|---|
| private boolean flushPreface | |
| frameListener | back to summary |
|---|---|
| private Http2FrameListener frameListener | |
| frameLogger | back to summary |
|---|---|
| private Http2FrameLogger frameLogger | |
| gracefulShutdownTimeoutMillis | back to summary |
|---|---|
| private long gracefulShutdownTimeoutMillis | |
| headerSensitivityDetector | back to summary |
|---|---|
| private Http2HeadersEncoder. | |
| initialSettings | back to summary |
|---|---|
| private Http2Settings initialSettings | |
| isServer | back to summary |
|---|---|
| private Boolean isServer | |
| maxConsecutiveEmptyFrames | back to summary |
|---|---|
| private int maxConsecutiveEmptyFrames | |
| maxQueuedControlFrames | back to summary |
|---|---|
| private int maxQueuedControlFrames | |
| maxReservedStreams | back to summary |
|---|---|
| private Integer maxReservedStreams | |
| maxRstFramesPerWindow | back to summary |
|---|---|
| private Integer maxRstFramesPerWindow | |
| promisedRequestVerifier | back to summary |
|---|---|
| private Http2PromisedRequestVerifier promisedRequestVerifier | |
| secondsPerWindow | back to summary |
|---|---|
| private int secondsPerWindow | |
| validateHeaders | back to summary |
|---|---|
| private Boolean validateHeaders | |
| AbstractHttp2ConnectionHandlerBuilder | back to summary |
|---|---|
| public AbstractHttp2ConnectionHandlerBuilder() | |
| autoAckPingFrame | back to summary |
|---|---|
| protected B autoAckPingFrame(boolean autoAckPingFrame) Determine if PING frame should automatically be acknowledged or not.
| |
| autoAckSettingsFrame | back to summary |
|---|---|
| protected B autoAckSettingsFrame(boolean autoAckSettings) Determine if settings frame should automatically be acknowledged and applied.
| |
| build | back to summary |
|---|---|
| protected T build() Create a new | |
| build | back to summary |
|---|---|
| protected abstract T build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings) throws Exception Implement this method to create a new The return of this method will be subject to the following:
| |
| buildFromCodec | back to summary |
|---|---|
| private T buildFromCodec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) | |
| buildFromConnection | back to summary |
|---|---|
| private T buildFromConnection(Http2Connection connection) | |
| codec | back to summary |
|---|---|
| protected B codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) Sets the | |
| connection | back to summary |
|---|---|
| protected Http2Connection connection() Returns the
| |
| connection | back to summary |
|---|---|
| protected B connection(Http2Connection connection) Sets the | |
| decoder | back to summary |
|---|---|
| protected Http2ConnectionDecoder decoder() Returns the
| |
| decoderEnforceMaxConsecutiveEmptyDataFrames | back to summary |
|---|---|
| protected int decoderEnforceMaxConsecutiveEmptyDataFrames() Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before
the connection is closed. This allows to protect against the remote peer flooding us with such frames and
so use up a lot of CPU. There is no valid use-case for empty DATA frames without end_of_stream flag.
| |
| decoderEnforceMaxConsecutiveEmptyDataFrames | back to summary |
|---|---|
| protected B decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames) Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before
the connection is closed. This allows to protect against the remote peer flooding us with such frames and
so use up a lot of CPU. There is no valid use-case for empty DATA frames without end_of_stream flag.
| |
| decoderEnforceMaxRstFramesPerWindow | back to summary |
|---|---|
| protected B decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow) Sets the maximum number RST frames that are allowed per window before
the connection is closed. This allows to protect against the remote peer flooding us with such frames and
so use up a lot of CPU.
| |
| decoupleCloseAndGoAway | back to summary |
|---|---|
| protected B decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway) Determine if the
| |
| decoupleCloseAndGoAway | back to summary |
|---|---|
| protected boolean decoupleCloseAndGoAway() Determine if the | |
| encoder | back to summary |
|---|---|
| protected Http2ConnectionEncoder encoder() Returns the
| |
| encoderEnforceMaxConcurrentStreams | back to summary |
|---|---|
| protected boolean encoderEnforceMaxConcurrentStreams() Returns if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded. | |
| encoderEnforceMaxConcurrentStreams | back to summary |
|---|---|
| protected B encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams) Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded. | |
| encoderEnforceMaxQueuedControlFrames | back to summary |
|---|---|
| protected int encoderEnforceMaxQueuedControlFrames() Returns the maximum number of queued control frames that are allowed before the connection is closed.
This allows to protected against various attacks that can lead to high CPU / memory usage if the remote-peer
floods us with frames that would have us produce control frames, but stops to read from the underlying socket.
| |
| encoderEnforceMaxQueuedControlFrames | back to summary |
|---|---|
| protected B encoderEnforceMaxQueuedControlFrames(int maxQueuedControlFrames) Sets the maximum number of queued control frames that are allowed before the connection is closed.
This allows to protected against various attacks that can lead to high CPU / memory usage if the remote-peer
floods us with frames that would have us produce control frames, but stops to read from the underlying socket.
| |
| encoderIgnoreMaxHeaderListSize | back to summary |
|---|---|
| protected B encoderIgnoreMaxHeaderListSize(boolean ignoreMaxHeaderListSize) Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers.
| |
| enforceConstraint | back to summary |
|---|---|
| private static void enforceConstraint(String methodName, String rejectorName, Object value) | |
| enforceNonCodecConstraints | back to summary |
|---|---|
| private void enforceNonCodecConstraints(String rejected) | |
| flushPreface | back to summary |
|---|---|
| protected B flushPreface(boolean flushPreface) Determine if the Preface
should be automatically flushed when the Client may choose to opt-out from this automatic behavior and manage flush manually if it's ready to send request frames immediately after the preface. It may help to avoid unnecessary latency.
| |
| flushPreface | back to summary |
|---|---|
| protected boolean flushPreface() Determine if the Preface
should be automatically flushed when the Client may choose to opt-out from this automatic behavior and manage flush manually if it's ready to send request frames immediately after the preface. It may help to avoid unnecessary latency.
| |
| frameListener | back to summary |
|---|---|
| protected Http2FrameListener frameListener() Returns the listener of inbound frames.
| |
| frameListener | back to summary |
|---|---|
| protected B frameListener(Http2FrameListener frameListener) Sets the listener of inbound frames.
This listener will only be set if the decoder's listener is | |
| frameLogger | back to summary |
|---|---|
| protected Http2FrameLogger frameLogger() Returns the logger that is used for the encoder and decoder.
| |
| frameLogger | back to summary |
|---|---|
| protected B frameLogger(Http2FrameLogger frameLogger) Sets the logger that is used for the encoder and decoder. | |
| gracefulShutdownTimeoutMillis | back to summary |
|---|---|
| protected long gracefulShutdownTimeoutMillis() Returns the graceful shutdown timeout of the | |
| gracefulShutdownTimeoutMillis | back to summary |
|---|---|
| protected B gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis) Sets the graceful shutdown timeout of the | |
| headerSensitivityDetector | back to summary |
|---|---|
| protected Http2HeadersEncoder. Returns the | |
| headerSensitivityDetector | back to summary |
|---|---|
| protected B headerSensitivityDetector(Http2HeadersEncoder. Sets the | |
| initialHuffmanDecodeCapacity | back to summary |
|---|---|
| protected B initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
Deprecated Huffman decoding no longer depends on having a decode capacity. Does nothing, do not call.
| |
| initialSettings | back to summary |
|---|---|
| protected Http2Settings initialSettings() Sets the | |
| initialSettings | back to summary |
|---|---|
| protected B initialSettings(Http2Settings settings) Sets the | |
| isAutoAckPingFrame | back to summary |
|---|---|
| protected boolean isAutoAckPingFrame() Determine if the PING frames should be automatically acknowledged or not.
| |
| isAutoAckSettingsFrame | back to summary |
|---|---|
| protected boolean isAutoAckSettingsFrame() Determine if the SETTINGS frames should be automatically acknowledged and applied.
| |
| isServer | back to summary |
|---|---|
| protected boolean isServer() Returns if | |
| isValidateHeaders | back to summary |
|---|---|
| protected boolean isValidateHeaders() Returns if HTTP headers should be validated according to RFC 7540, 8.1.2.6. | |
| maxReservedStreams | back to summary |
|---|---|
| protected int maxReservedStreams() Get the maximum number of streams which can be in the reserved state at any given time. By default this value will be ignored on the server for local endpoint. This is because the RFC provides no way to explicitly communicate a limit to how many states can be in the reserved state, and instead relies on the peer to send RST_STREAM frames when they will be rejected. | |
| maxReservedStreams | back to summary |
|---|---|
| protected B maxReservedStreams(int maxReservedStreams) Set the maximum number of streams which can be in the reserved state at any given time. | |
| promisedRequestVerifier | back to summary |
|---|---|
| protected B promisedRequestVerifier(Http2PromisedRequestVerifier promisedRequestVerifier) Set the
| |
| promisedRequestVerifier | back to summary |
|---|---|
| protected Http2PromisedRequestVerifier promisedRequestVerifier() Get the
| |
| self | back to summary |
|---|---|
| protected final B self() Returns
| |
| server | back to summary |
|---|---|
| protected B server(boolean isServer) Sets if | |
| validateHeaders | back to summary |
|---|---|
| protected B validateHeaders(boolean validateHeaders) Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6. | |