Window reflecting this side's view of the peer's LocalWindow. A RemoteWindow is initialized
when the peer announces its packet and window sizes in the initial message exchange when opening a channel. Whenever
this side wants to send data, it checks whether the remote window has still enough space; if not, it sends only as
much data as possible. When data is sent, the remote window size is reduced by the number of data bytes sent. When
the window size drops to zero, no data is sent at all, and this side will have to wait for an
SSH_MSG_CHANNEL_WINDOW_ADJUST message from the peer, which will increase the available window size again.
| Modifier and Type | Field and Description |
|---|---|
| private static final Predicate | SPACE_AVAILABLE_PREDICATE
Default |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | init(long
the initial window size size, long the peer's advertised maximum packet size packetSize, PropertyResolver {@PropertyResolver } to access properties resolver)Overrides org. Initializes the |
| public void | waitAndConsume(long
Size of data to consume len, long Max. time (millis) to wait for enough data to become available maxWaitTime)Waits for enough data to become available to consume the specified size |
| public void | waitAndConsume(long
Size of data to consume len, Duration Max. time to wait for enough data to become available maxWaitTime)Waits for enough data to become available to consume the specified size |
| protected void | waitForCondition(Predicate<? super Window>
The predicate, Duration Predicate to check if the condition has been satisfied - the argument
to the predicate is this referenceMax. time to wait for the condition to be satisfied maxWaitTime)Waits up to a specified amount of time for a condition to be satisfied and signaled via the lock Note assumes that lock is acquired when this method is called. |
| public long | Returns: Amount of available data - always positiveMax. time (millis) to wait for space to become available maxWaitTime)Waits until some data becomes available or timeout expires |
| public long | Returns: Amount of available data - always positiveMax. time to wait for space to become available maxWaitTime)Waits until some data becomes available or timeout expires |
| SPACE_AVAILABLE_PREDICATE | back to summary |
|---|---|
| private static final Predicate<Window> SPACE_AVAILABLE_PREDICATE Default | |
| RemoteWindow | back to summary |
|---|---|
| public RemoteWindow(Channel channel, boolean isClient) | |
| consume | back to summary |
|---|---|
| public void consume(long len) Implements abstract org.
| |
| expand | back to summary |
|---|---|
| public void expand(long increment) | |
| init | back to summary |
|---|---|
| public void init(long size, long packetSize, PropertyResolver resolver) Overrides org. Initializes the
| |
| waitAndConsume | back to summary |
|---|---|
| public void waitAndConsume(long len, long maxWaitTime) throws InterruptedException, WindowClosedException, SocketTimeoutException Waits for enough data to become available to consume the specified size
| |
| waitAndConsume | back to summary |
|---|---|
| public void waitAndConsume(long len, Duration maxWaitTime) throws InterruptedException, WindowClosedException, SocketTimeoutException Waits for enough data to become available to consume the specified size
| |
| waitForCondition | back to summary |
|---|---|
| protected void waitForCondition(Predicate<? super Window> predicate, Duration maxWaitTime) throws WindowClosedException, InterruptedException, SocketTimeoutException Waits up to a specified amount of time for a condition to be satisfied and signaled via the lock Note assumes that lock is acquired when this method is called.
| |
| waitForSpace | back to summary |
|---|---|
| public long waitForSpace(long maxWaitTime) throws InterruptedException, WindowClosedException, SocketTimeoutException Waits until some data becomes available or timeout expires
| |
| waitForSpace | back to summary |
|---|---|
| public long waitForSpace(Duration maxWaitTime) throws InterruptedException, WindowClosedException, SocketTimeoutException Waits until some data becomes available or timeout expires
| |