Class ProxyConnectionFactory.ProxyV1ConnectionFactory.ProxyProtocolV1Connection

    • Field Detail

      • _connector

        private final Connector _connector
      • _buffer

        private final java.nio.ByteBuffer _buffer
      • _builder

        private final java.lang.StringBuilder _builder
      • _fields

        private final java.lang.String[] _fields
      • _index

        private int _index
      • _length

        private int _length
    • Method Detail

      • 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.
      • 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.
      • parse

        private boolean parse()
                       throws java.io.IOException
        Returns:
        true when parsing is done, false when more bytes are needed.
        Throws:
        java.io.IOException
      • releaseAndClose

        private void releaseAndClose()
      • upgrade

        private void upgrade()