Class OptionalSslConnectionFactory

All Implemented Interfaces:
ConnectionFactory, ConnectionFactory.Detecting, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle

@Deprecated public class OptionalSslConnectionFactory extends DetectorConnectionFactory
Deprecated.

A ConnectionFactory whose connections detect whether the first bytes are TLS bytes and upgrades to either a TLS connection or to another configurable connection.

  • Constructor Details

    • OptionalSslConnectionFactory

      public OptionalSslConnectionFactory(SslConnectionFactory sslConnectionFactory, 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 Details

    • nextProtocol

      protected void nextProtocol(Connector connector, EndPoint endPoint, 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(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