DecoratingHttp2ConnectionEncoder which guards against a remote peer that will trigger a massive amount
of control frames but will not consume our responses to these.
This encoder will tear-down the connection once we reached the configured limit to reduce the risk of DDOS.
| Modifier and Type | Field and Description |
|---|---|
| private Http2LifecycleManager | |
| private boolean | |
| private static final InternalLogger | |
| private final int | |
| private int | |
| private final ChannelFutureListener |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private ChannelPromise | |
| public void | lifecycleManager(Http2LifecycleManager lifecycleManager)
Overrides io. Implements io. |
| public ChannelFuture | writePing(ChannelHandlerContext
the context to use for writing. ctx, boolean indicates whether this is an ack of a PING frame previously received from the
remote endpoint. ack, long the payload of the frame. data, ChannelPromise the promise for the write. promise)Overrides io. Implements io. |
| public ChannelFuture | writeRstStream(ChannelHandlerContext
the context to use for writing. ctx, int the stream for which to send the frame. streamId, long the error code indicating the nature of the failure. errorCode, ChannelPromise the promise for the write. promise)Overrides io. Implements io. |
| public ChannelFuture | writeSettingsAck(ChannelHandlerContext
the context to use for writing. ctx, ChannelPromise the promise for the write. promise)Overrides io. Implements io. |
| lifecycleManager | back to summary |
|---|---|
| private Http2LifecycleManager lifecycleManager | |
| limitReached | back to summary |
|---|---|
| private boolean limitReached | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| maxOutstandingControlFrames | back to summary |
|---|---|
| private final int maxOutstandingControlFrames | |
| outstandingControlFrames | back to summary |
|---|---|
| private int outstandingControlFrames | |
| outstandingControlFramesListener | back to summary |
|---|---|
| private final ChannelFutureListener outstandingControlFramesListener | |
| Http2ControlFrameLimitEncoder | back to summary |
|---|---|
| pack-priv Http2ControlFrameLimitEncoder(Http2ConnectionEncoder delegate, int maxOutstandingControlFrames) | |
| handleOutstandingControlFrames | back to summary |
|---|---|
| private ChannelPromise handleOutstandingControlFrames(ChannelHandlerContext ctx, ChannelPromise promise) | |
| lifecycleManager | back to summary |
|---|---|
| public void lifecycleManager(Http2LifecycleManager lifecycleManager) Overrides io. Implements io. Doc from io. Sets the lifecycle manager. Must be called as part of initialization before the encoder is used.
| |
| writePing | back to summary |
|---|---|
| public ChannelFuture writePing(ChannelHandlerContext ctx, boolean ack, long data, ChannelPromise promise) Overrides io. Implements io. Doc from io. Writes a PING frame to the remote endpoint.
| |
| writeRstStream | back to summary |
|---|---|
| public ChannelFuture writeRstStream(ChannelHandlerContext ctx, int streamId, long errorCode, ChannelPromise promise) Overrides io. Implements io. Doc from io. Writes a RST_STREAM frame to the remote endpoint.
| |
| writeSettingsAck | back to summary |
|---|---|
| public ChannelFuture writeSettingsAck(ChannelHandlerContext ctx, ChannelPromise promise) Overrides io. Implements io. Doc from io. Writes a SETTINGS acknowledgment to the remote endpoint.
| |