Class OptionalSslConnectionFactory

    • Constructor Detail

      • OptionalSslConnectionFactory

        public OptionalSslConnectionFactory​(SslConnectionFactory sslConnectionFactory,
                                            java.lang.String nextProtocol)
        Deprecated.

        Creates a new ConnectionFactory whose connections can upgrade to TLS or another protocol.

        Parameters:
        sslConnectionFactory - The SslConnectionFactory to use if the first bytes are TLS
        nextProtocol - the protocol of the ConnectionFactory to use if the first bytes are not TLS, or null to explicitly handle the non-TLS case
    • Method Detail

      • nextProtocol

        protected void nextProtocol​(Connector connector,
                                    EndPoint endPoint,
                                    java.nio.ByteBuffer buffer)
        Deprecated.

        Callback method invoked when the detected bytes are not TLS.

        This typically happens when a client is trying to connect to a TLS port using the http scheme (and not the https scheme).

        Overrides:
        nextProtocol in class DetectorConnectionFactory
        Parameters:
        connector - The connector object
        endPoint - The connection EndPoint object
        buffer - The buffer with the first bytes of the connection
      • otherProtocol

        @Deprecated
        protected void otherProtocol​(java.nio.ByteBuffer buffer,
                                     EndPoint endPoint)
        Deprecated.

        Legacy callback method invoked when nextProtocol is null and the first bytes are not TLS.

        This typically happens when a client is trying to connect to a TLS port using the http scheme (and not the https scheme).

        This method is kept around for backward compatibility.

        Parameters:
        buffer - The buffer with the first bytes of the connection
        endPoint - The connection EndPoint object