Class LocalWindow

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ChannelHolder

    public class LocalWindow
    extends Window
    A 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.
    • Constructor Detail

      • LocalWindow

        public LocalWindow​(AbstractChannel channel,
                           boolean isClient)
    • Method Detail

      • init

        public void init​(PropertyResolver resolver)
        Initializes the LocalWindow with the packet and window sizes from the resolver.
        Parameters:
        size - the initial window size
        packetSize - the peer's advertised maximum packet size
        resolver - to access properties
      • consume

        public void consume​(long len)
                     throws java.io.IOException
        Specified by:
        consume in class Window
        Throws:
        java.io.IOException
      • check

        public void check()
                   throws java.io.IOException
        Throws:
        java.io.IOException