Class HttpChannelOverHTTP2

    • Method Detail

      • getStream

        protected IStream getStream()
      • setIdleTimeout

        public void setIdleTimeout​(long timeoutMs)
        Description copied from class: HttpChannel
        Set the idle timeout.

        This is implemented as a call to EndPoint.setIdleTimeout(long), but may be overridden by channels that have timeouts different from their connections.

        Overrides:
        setIdleTimeout in class HttpChannel
        Parameters:
        timeoutMs - the idle timeout in milliseconds
      • getIdleTimeout

        public long getIdleTimeout()
        Description copied from class: HttpChannel
        Get the idle timeout.

        This is implemented as a call to EndPoint.getIdleTimeout(), but may be overridden by channels that have timeouts different from their connections.

        Overrides:
        getIdleTimeout in class HttpChannel
        Returns:
        the idle timeout (in milliseconds)
      • onFlushed

        public void onFlushed​(long bytes)
                       throws java.io.IOException
        Description copied from interface: WriteFlusher.Listener

        Invoked when a WriteFlusher flushed bytes in a non-blocking way, as part of a - possibly larger - write.

        This method may be invoked multiple times, for example when writing a large buffer: a first flush of bytes, then the connection became TCP congested, and a subsequent flush of bytes when the connection became writable again.

        This method is never invoked concurrently, but may be invoked by different threads, so implementations may not rely on thread-local variables.

        Implementations may throw an IOException to signal that the write should fail, for example if the implementation enforces a minimum data rate.

        Specified by:
        onFlushed in interface WriteFlusher.Listener
        Parameters:
        bytes - the number of bytes flushed
        Throws:
        java.io.IOException - if the write should fail
      • onRequest

        public java.lang.Runnable onRequest​(HeadersFrame frame)
      • onPushRequest

        public java.lang.Runnable onPushRequest​(MetaData.Request request)
      • onRequestContent

        public java.lang.Runnable onRequestContent​(DataFrame frame,
                                                   Callback callback)
      • onRequestTrailers

        public java.lang.Runnable onRequestTrailers​(HeadersFrame frame)
      • isRequestIdle

        public boolean isRequestIdle()
      • onStreamTimeout

        public boolean onStreamTimeout​(java.lang.Throwable failure,
                                       java.util.function.Consumer<java.lang.Runnable> consumer)
      • onFailure

        public java.lang.Runnable onFailure​(java.lang.Throwable failure,
                                            Callback callback)
      • consumeInput

        protected void consumeInput()
      • continue100

        public void continue100​(int available)
                         throws java.io.IOException
        If the associated response has the Expect header set to 100 Continue, then accessing the input stream indicates that the handler/servlet is ready for the request body and thus a 100 Continue response is sent.
        Overrides:
        continue100 in class HttpChannel
        Parameters:
        available - estimate of the number of bytes that are available
        Throws:
        java.io.IOException - if the InputStream cannot be created
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable