Class AbstractHttp1StreamDuplexer.CapacityWindow

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (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 getWindow()  
      (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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ioSession

        private final IOSession ioSession
      • lock

        private final java.lang.Object lock
      • window

        private int window
      • closed

        private boolean closed
    • Constructor Detail

      • CapacityWindow

        CapacityWindow​(int window,
                       IOSession ioSession)
    • Method Detail

      • update

        public void update​(int increment)
                    throws java.io.IOException
        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 interface CapacityChannel
        Parameters:
        increment - non-negative number of extra bytes the consumer can accept.
        Throws:
        java.io.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()