public interface Http2LocalFlowController extends Http2FlowController
Http2FlowController
for controlling the inbound flow of DATA
frames from the remote
endpoint.Modifier and Type | Method and Description |
---|---|
void |
consumeBytes(ChannelHandlerContext ctx,
Http2Stream stream,
int numBytes)
Indicates that the application has consumed a number of bytes for the given stream and is
therefore ready to receive more data from the remote endpoint.
|
void |
receiveFlowControlledFrame(ChannelHandlerContext ctx,
Http2Stream stream,
ByteBuf data,
int padding,
boolean endOfStream)
Receives an inbound
DATA frame from the remote endpoint and applies flow control
policies to it for both the stream as well as the connection. |
int |
unconsumedBytes(Http2Stream stream)
The number of bytes for the given stream that have been received but not yet consumed by the
application.
|
incrementWindowSize, initialWindowSize, initialWindowSize, windowSize
void receiveFlowControlledFrame(ChannelHandlerContext ctx, Http2Stream stream, ByteBuf data, int padding, boolean endOfStream) throws Http2Exception
DATA
frame from the remote endpoint and applies flow control
policies to it for both the stream
as well as the connection. If any flow control
policies have been violated, an exception is raised immediately, otherwise the frame is
considered to have "passed" flow control.ctx
- the context from the handler where the frame was read.stream
- the subject stream for the received frame. The connection stream object must
not be used.data
- payload buffer for the frame.padding
- the number of padding bytes found at the end of the frame.endOfStream
- Indicates whether this is the last frame to be sent from the remote
endpoint for this stream.Http2Exception
- if any flow control errors are encountered.void consumeBytes(ChannelHandlerContext ctx, Http2Stream stream, int numBytes) throws Http2Exception
WINDOW_UPDATE
to restore a portion of the flow control
window for the stream.ctx
- the channel handler context to use when sending a WINDOW_UPDATE
if
appropriatestream
- the stream for which window space should be freed. The connection stream object
must not be used.numBytes
- the number of bytes to be returned to the flow control window.Http2Exception
- if the number of bytes returned exceeds the unconsumedBytes(io.netty.handler.codec.http2.Http2Stream)
for the stream.int unconsumedBytes(Http2Stream stream)
stream
- the stream for which window space should be freed.Copyright © 2008–2015 The Netty Project. All rights reserved.