Package org.mockserver.netty.connection
Class Http2StreamWriteStallHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
org.mockserver.netty.connection.Http2StreamWriteStallHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler,Runnable
public final class Http2StreamWriteStallHandler
extends io.netty.channel.ChannelDuplexHandler
implements Runnable
Resets an HTTP/2 stream whose response has data waiting in the connection's flow controller that the client has
taken none of for
responseWriteStallTimeoutMillis. A client can stop granting one stream flow-control window
while it keeps reading the connection, so a stalled stream is invisible at the connection level;
WriteStallTimeoutHandler covers a connection whose socket stalls.
A stream progresses only when the flow controller writes some of its data, which WrittenBytesFlowController
counts as it leaves. The window a client returns for a stream never counts as progress: it only tells which of the
streams already timed out is reset first. What else spares a stream whose own window is open, and which stream is
reset when one holds the connection window the others wait for, is in "Response Write-Stall Timeout" in
docs/code/netty-pipeline.md.
Sits anywhere after the connection's Http2ConnectionHandler, whose remote flow controller it wraps. A timer
runs only while the connection has active streams.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Constructor Summary
ConstructorsConstructorDescriptionHttp2StreamWriteStallHandler(long timeoutMillis, org.mockserver.logging.MockServerLogger mockServerLogger) -
Method Summary
Modifier and TypeMethodDescriptionvoidflush(io.netty.channel.ChannelHandlerContext ctx) voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) voidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx) voidrun()Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, read, writeMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
Http2StreamWriteStallHandler
public Http2StreamWriteStallHandler(long timeoutMillis, org.mockserver.logging.MockServerLogger mockServerLogger)
-
-
Method Details
-
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerAddedin classio.netty.channel.ChannelHandlerAdapter
-
handlerRemoved
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerRemovedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerRemovedin classio.netty.channel.ChannelHandlerAdapter
-
flush
public void flush(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
flushin interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
flushin classio.netty.channel.ChannelDuplexHandler
-
run
public void run()
-