Class AbstractHttp1StreamDuplexer.CapacityWindow
java.lang.Object
org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.CapacityWindow
- All Implemented Interfaces:
CapacityChannel
- Enclosing class:
AbstractHttp1StreamDuplexer<IncomingMessage extends HttpMessage,
OutgoingMessage extends HttpMessage>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
close()
Closes the capacity channel, preventing user code from accidentally requesting read events outside of the context of the request the channel was created for(package private) int
(package private) int
removeCapacity
(int delta) Internal method for removing capacity.void
update
(int increment) Updates data capacity information through this channel.private void
updateWindow
(int delta)
-
Field Details
-
ioSession
-
lock
-
window
private int window -
closed
private boolean closed
-
-
Constructor Details
-
CapacityWindow
CapacityWindow(int window, IOSession ioSession)
-
-
Method Details
-
update
Description copied from interface:CapacityChannel
Updates data capacity information through this channel. The total number of bytes the consumer is capable of accepting is incremented by the given increment number.- Specified by:
update
in interfaceCapacityChannel
- Parameters:
increment
- non-negative number of extra bytes the consumer can accept.- Throws:
IOException
-
removeCapacity
int removeCapacity(int delta) Internal method for removing capacity. We don't need to check if this channel is closed in it. -
updateWindow
private void updateWindow(int delta) -
close
void close()Closes the capacity channel, preventing user code from accidentally requesting read events outside of the context of the request the channel was created for -
getWindow
int getWindow()
-