Class ProxyConnectionFactory.ProxyV2ConnectionFactory.ProxyProtocolV2Connection

    • Method Detail

      • 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
        Parameters:
        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.
      • 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
        Overrides:
        onOpen in class AbstractConnection
      • onUpgradeFrom

        public java.nio.ByteBuffer onUpgradeFrom()
        Description copied from interface: Connection.UpgradeFrom

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

        Specified by:
        onUpgradeFrom in interface Connection.UpgradeFrom
        Returns:
        a buffer of unconsumed bytes to pass to the upgrade-to connection. The buffer does not belong to any pool and should be discarded after having consumed its bytes. The returned buffer may be null if there are no unconsumed bytes.
      • parseBodyAndUpgrade

        private void parseBodyAndUpgrade()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseHeader

        private void parseHeader()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • releaseAndClose

        private void releaseAndClose()