Class OptionalSslConnectionFactory

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
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.Dumpable.DumpableContainer, 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, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface ConnectionFactory.Detecting

    ConnectionFactory.Detecting.Detection

    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.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    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, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    OptionalSslConnectionFactory(SslConnectionFactory sslConnectionFactory, String nextProtocol)
    Deprecated.
    Creates a new ConnectionFactory whose connections can upgrade to TLS or another protocol.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    nextProtocol(Connector connector, org.eclipse.jetty.io.EndPoint endPoint, ByteBuffer buffer)
    Deprecated.
    Callback method invoked when the detected bytes are not TLS.
    protected void
    otherProtocol(ByteBuffer buffer, org.eclipse.jetty.io.EndPoint endPoint)
    Deprecated.

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface ConnectionFactory

    getProtocol, getProtocols

    Methods inherited from interface org.eclipse.jetty.util.component.Container

    getCachedBeans, getEventListeners

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

    dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable
  • 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, org.eclipse.jetty.io.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, org.eclipse.jetty.io.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