Class AbstractH2StreamMultiplexer

    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface Identifiable
      • submitCommand

        void submitCommand​(Command command)
      • allowGracefulAbort

        abstract boolean allowGracefulAbort​(H2Stream stream)
      • updateWindow

        private int updateWindow​(java.util.concurrent.atomic.AtomicInteger window,
                                 int delta)
                          throws java.lang.ArithmeticException
        Throws:
        java.lang.ArithmeticException
      • updateWindowMax

        private int updateWindowMax​(java.util.concurrent.atomic.AtomicInteger window)
                             throws java.lang.ArithmeticException
        Throws:
        java.lang.ArithmeticException
      • updateInputWindow

        private int updateInputWindow​(int streamId,
                                      java.util.concurrent.atomic.AtomicInteger window,
                                      int delta)
                               throws java.lang.ArithmeticException
        Throws:
        java.lang.ArithmeticException
      • updateOutputWindow

        private int updateOutputWindow​(int streamId,
                                       java.util.concurrent.atomic.AtomicInteger window,
                                       int delta)
                                throws java.lang.ArithmeticException
        Throws:
        java.lang.ArithmeticException
      • commitFrameInternal

        private void commitFrameInternal​(RawFrame frame)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • commitFrame

        private void commitFrame​(RawFrame frame)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • commitHeaders

        private void commitHeaders​(int streamId,
                                   java.util.List<? extends Header> headers,
                                   boolean endStream)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • commitPushPromise

        private void commitPushPromise​(int streamId,
                                       int promisedStreamId,
                                       java.util.List<Header> headers)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • streamDataFrame

        private void streamDataFrame​(int streamId,
                                     java.util.concurrent.atomic.AtomicInteger streamOutputWindow,
                                     java.nio.ByteBuffer payload,
                                     int chunk)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • streamData

        private int streamData​(int streamId,
                               java.util.concurrent.atomic.AtomicInteger streamOutputWindow,
                               java.nio.ByteBuffer payload)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • incrementInputCapacity

        private void incrementInputCapacity​(int streamId,
                                            java.util.concurrent.atomic.AtomicInteger inputWindow,
                                            int inputCapacity)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • requestSessionOutput

        void requestSessionOutput()
      • onInput

        public final void onInput​(java.nio.ByteBuffer src)
                           throws HttpException,
                                  java.io.IOException
        Throws:
        HttpException
        java.io.IOException
      • onDisconnect

        public final void onDisconnect()
      • executeShutdown

        private void executeShutdown​(ShutdownCommand shutdownCommand)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • executePing

        private void executePing​(PingCommand pingCommand)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • executeStaleCheck

        private void executeStaleCheck​(StaleCheckCommand staleCheckCommand)
      • onException

        public final void onException​(java.lang.Exception cause)
      • maximizeWindow

        private void maximizeWindow​(int streamId,
                                    java.util.concurrent.atomic.AtomicInteger window)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • consumePushPromiseFrame

        private void consumePushPromiseFrame​(RawFrame frame,
                                             java.nio.ByteBuffer payload,
                                             H2Stream promisedStream)
                                      throws HttpException,
                                             java.io.IOException
        Throws:
        HttpException
        java.io.IOException
      • consumeSettingsFrame

        private void consumeSettingsFrame​(java.nio.ByteBuffer payload)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • produceOutput

        private void produceOutput()
                            throws HttpException,
                                   java.io.IOException
        Throws:
        HttpException
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: HttpConnection
        Closes this connection gracefully. This method will attempt to flush the internal output buffer prior to closing the underlying socket. This method MUST NOT be called from a different thread to force shutdown of the connection. Use close(CloseMode.IMMEDIATE) instead.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface HttpConnection
        Throws:
        java.io.IOException
      • close

        public void close​(CloseMode closeMode)
        Description copied from interface: ModalCloseable
        Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.
        Specified by:
        close in interface ModalCloseable
        Parameters:
        closeMode - How to close the receiver.
      • isOpen

        public boolean isOpen()
        Description copied from interface: HttpConnection
        Checks if this connection is open.
        Specified by:
        isOpen in interface HttpConnection
        Returns:
        true if it is open, false if it is closed.
      • getSSLSession

        public javax.net.ssl.SSLSession getSSLSession()
        Description copied from interface: HttpConnection
        Returns this connection's SSL session or null if TLS has not been activated.
        Specified by:
        getSSLSession in interface HttpConnection
        Returns:
        this connection's SSL session or null if TLS has not been activated.
      • getProtocolVersion

        public ProtocolVersion getProtocolVersion()
        Description copied from interface: HttpConnection
        Returns this connection's protocol version or null if unknown.
        Specified by:
        getProtocolVersion in interface HttpConnection
        Returns:
        this connection's protocol version or null if unknown.
      • getRemoteAddress

        public java.net.SocketAddress getRemoteAddress()
        Description copied from interface: HttpConnection
        Returns this connection's remote address or null if it is not connected yet or unconnected.
        Specified by:
        getRemoteAddress in interface HttpConnection
        Returns:
        this connection's remote address or null if it is not connected yet or unconnected.
      • getLocalAddress

        public java.net.SocketAddress getLocalAddress()
        Description copied from interface: HttpConnection
        Returns this connection's local address or null if it is not bound yet.
        Specified by:
        getLocalAddress in interface HttpConnection
        Returns:
        this connection's local address or null if it is not bound yet.
      • appendState

        void appendState​(java.lang.StringBuilder buf)
      • recordPriorityFromHeaders

        private void recordPriorityFromHeaders​(H2Stream stream,
                                               java.util.List<? extends Header> headers)
      • parsePriorityValue

        private PriorityValue parsePriorityValue​(java.lang.String field)