Class OptionalSslConnectionFactory

  • All Implemented Interfaces:
    ConnectionFactory, ConnectionFactory.Detecting, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.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.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

        org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

        org.eclipse.jetty.util.component.LifeCycle.Listener
    • Field Summary

      • Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
      • Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

        KEY
    • Constructor Summary

      Constructors 
      Constructor Description
      OptionalSslConnectionFactory​(SslConnectionFactory sslConnectionFactory, java.lang.String nextProtocol)
      Deprecated.
      Creates a new ConnectionFactory whose connections can upgrade to TLS or another protocol.
    • 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