private final class DefaultHttp2RemoteFlowController.ListenerWritabilityMonitor extends DefaultHttp2RemoteFlowController.WritabilityMonitor
stream
is calculated using the following:
Connection Window - Total Queued Bytes > 0 && Stream Window - Bytes Queued for Stream > 0 && isChannelWritable()
Modifier and Type | Field and Description |
---|---|
private Http2StreamVisitor |
checkStreamWritabilityVisitor |
private Http2RemoteFlowController.Listener |
listener |
Constructor and Description |
---|
ListenerWritabilityMonitor(Http2RemoteFlowController.Listener listener) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
channelWritabilityChange()
Called when the writability of the underlying channel changes.
|
private void |
checkAllWritabilityChanged() |
private void |
checkConnectionThenStreamWritabilityChanged(DefaultHttp2RemoteFlowController.FlowState state) |
private void |
checkStateWritability(DefaultHttp2RemoteFlowController.FlowState state) |
(package private) void |
enqueueFrame(DefaultHttp2RemoteFlowController.FlowState state,
Http2RemoteFlowController.FlowControlled frame)
Add a frame to be sent via flow control.
|
(package private) void |
incrementWindowSize(DefaultHttp2RemoteFlowController.FlowState state,
int delta)
Increment the window size for a particular stream.
|
(package private) void |
initialWindowSize(int newWindowSize) |
private void |
notifyWritabilityChanged(DefaultHttp2RemoteFlowController.FlowState state) |
(package private) void |
stateCancelled(DefaultHttp2RemoteFlowController.FlowState state)
Called when the state is cancelled.
|
(package private) void |
windowSize(DefaultHttp2RemoteFlowController.FlowState state,
int initialWindowSize)
Set the initial window size for
state . |
incrementPendingBytes, isWritable, isWritableConnection, writePendingBytes
private final Http2RemoteFlowController.Listener listener
private final Http2StreamVisitor checkStreamWritabilityVisitor
ListenerWritabilityMonitor(Http2RemoteFlowController.Listener listener)
void windowSize(DefaultHttp2RemoteFlowController.FlowState state, int initialWindowSize)
DefaultHttp2RemoteFlowController.WritabilityMonitor
state
.windowSize
in class DefaultHttp2RemoteFlowController.WritabilityMonitor
state
- the state to change the initial window size for.initialWindowSize
- the size of the window in bytes.void incrementWindowSize(DefaultHttp2RemoteFlowController.FlowState state, int delta) throws Http2Exception
DefaultHttp2RemoteFlowController.WritabilityMonitor
incrementWindowSize
in class DefaultHttp2RemoteFlowController.WritabilityMonitor
state
- the state associated with the stream whose window is being incremented.delta
- The amount to increment by.Http2Exception
- If this operation overflows the window for state
.void initialWindowSize(int newWindowSize) throws Http2Exception
initialWindowSize
in class DefaultHttp2RemoteFlowController.WritabilityMonitor
Http2Exception
void enqueueFrame(DefaultHttp2RemoteFlowController.FlowState state, Http2RemoteFlowController.FlowControlled frame) throws Http2Exception
DefaultHttp2RemoteFlowController.WritabilityMonitor
enqueueFrame
in class DefaultHttp2RemoteFlowController.WritabilityMonitor
state
- The state associated with the stream which the frame
is associated with.frame
- the frame to enqueue.Http2Exception
- If a writability error occurs.void stateCancelled(DefaultHttp2RemoteFlowController.FlowState state)
DefaultHttp2RemoteFlowController.WritabilityMonitor
stateCancelled
in class DefaultHttp2RemoteFlowController.WritabilityMonitor
state
- the state that was cancelled.void channelWritabilityChange() throws Http2Exception
DefaultHttp2RemoteFlowController.WritabilityMonitor
channelWritabilityChange
in class DefaultHttp2RemoteFlowController.WritabilityMonitor
Http2Exception
- If a write occurs and an exception happens in the write operation.private void checkStateWritability(DefaultHttp2RemoteFlowController.FlowState state) throws Http2Exception
Http2Exception
private void notifyWritabilityChanged(DefaultHttp2RemoteFlowController.FlowState state)
private void checkConnectionThenStreamWritabilityChanged(DefaultHttp2RemoteFlowController.FlowState state) throws Http2Exception
Http2Exception
private void checkAllWritabilityChanged() throws Http2Exception
Http2Exception