public class LocalWindow extends Window
Window that describes how much data this side is prepared to receive from the peer. Initialized when the
channel is created. This side reduces the window by the amount of data received on reception; if it receives more
data than allowed, it closes the channel. Once the data received has been processed, for instance, passed on, this
side checks the current window size and if it is low, increases it and sends an SSH_MSG_CHANNEL_WINDOW_ADJUST message
to the peer, who then is allowed to send more data again.log| Constructor and Description |
|---|
LocalWindow(AbstractChannel channel,
boolean isClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(long len) |
AbstractChannel |
getChannel() |
void |
init(PropertyResolver resolver)
Initializes the
LocalWindow with the packet and window sizes from the resolver. |
void |
release(long len)
Updates the window once data that has arrived in a channel has been read, making available room for the sender
too send more data, sending a window adjust message if necessary.
|
checkInitialized, close, getMaxSize, getPacketSize, getSize, init, isOpen, largerThan, toString, updateSizepublic LocalWindow(AbstractChannel channel, boolean isClient)
public AbstractChannel getChannel()
getChannel in interface ChannelHoldergetChannel in class WindowChannel instancepublic void init(PropertyResolver resolver)
LocalWindow with the packet and window sizes from the resolver.resolver - to access propertiespublic void consume(long len)
throws IOException
consume in class WindowIOExceptionpublic void release(long len)
throws IOException
len - length of data read from the channelIOException - if sending a window adjust message failsCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.