Class HTTP2Connection

    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
    • Method Detail

      • getSession

        public ISession getSession()
      • getParser

        protected Parser getParser()
      • onUpgradeTo

        public void onUpgradeTo​(java.nio.ByteBuffer buffer)
        Description copied from interface: Connection.UpgradeTo

        Invoked during an upgrade to receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.

        Specified by:
        onUpgradeTo in interface Connection.UpgradeTo
        buffer - a non-null buffer of unconsumed bytes received from the upgrade-from connection. The buffer does not belong to any pool and should be discarded after having consumed its bytes.
      • isUseInputDirectByteBuffers

        public boolean isUseInputDirectByteBuffers()
      • setUseInputDirectByteBuffers

        public void setUseInputDirectByteBuffers​(boolean useInputDirectByteBuffers)
      • isUseOutputDirectByteBuffers

        public boolean isUseOutputDirectByteBuffers()
      • setUseOutputDirectByteBuffers

        public void setUseOutputDirectByteBuffers​(boolean useOutputDirectByteBuffers)
      • onOpen

        public void onOpen()
        Description copied from interface: Connection

        Callback method invoked when this connection is opened.

        Creators of the connection implementation are responsible for calling this method.

        Specified by:
        onOpen in interface Connection
        onOpen in class AbstractConnection
      • onClose

        public void onClose​(java.lang.Throwable cause)
        Description copied from interface: Connection

        Callback method invoked when this connection is closed.

        Creators of the connection implementation are responsible for calling this method.

        Specified by:
        onClose in interface Connection
        onClose in class AbstractConnection
        cause - The cause of the close or null for a normal close
      • onIdleExpired

        public boolean onIdleExpired()
        Description copied from interface: Connection

        Callback method invoked upon an idle timeout event.

        Implementations of this method may return true to indicate that the idle timeout handling should proceed normally, typically failing the EndPoint and causing it to be closed.

        When false is returned, the handling of the idle timeout event is halted immediately and the EndPoint left in the state it was before the idle timeout event.

        Specified by:
        onIdleExpired in interface Connection
        onIdleExpired in class AbstractConnection
        true to let the EndPoint handle the idle timeout, false to tell the EndPoint to halt the handling of the idle timeout.
      • offerTask

        protected void offerTask​(java.lang.Runnable task,
                                 boolean dispatch)
      • produce

        protected void produce()
      • dispatch

        protected void dispatch()
      • close

        public void close()
        Description copied from interface: Connection

        Performs a logical close of this connection.

        For simple connections, this may just mean to delegate the close to the associated EndPoint but, for example, SSL connections should write the SSL close message before closing the associated EndPoint.

        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface
        Specified by:
        close in interface Connection
        close in class AbstractConnection
      • onFlushed

        public void onFlushed​(long bytes)
        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
        bytes - the number of bytes flushed
        Throws: - if the write should fail