Top Description Fields Constructors Methods
org.eclipse.jetty.server

public Class OptionalSslConnectionFactory

extends DetectorConnectionFactory
Class Inheritance
Annotations
@Deprecated
Imports
java.nio.ByteBuffer, java.nio.charset.StandardCharsets, org.eclipse.jetty.io.EndPoint, org.eclipse.jetty.util.Callback, org.slf4j.Logger, .LoggerFactory

Deprecated

Use DetectorConnectionFactory with a SslConnectionFactory instead.

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

Field Summary

Modifier and TypeField and Description
private final String
private static final Logger

Constructor Summary

AccessConstructor and Description
public
OptionalSslConnectionFactory(SslConnectionFactory
The SslConnectionFactory to use if the first bytes are TLS
sslConnectionFactory
,
String
the protocol of the ConnectionFactory to use if the first bytes are not TLS, or null to explicitly handle the non-TLS case
nextProtocol
)

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

Method Summary

Modifier and TypeMethod and Description
protected void
nextProtocol(Connector
The connector object
connector
,
EndPoint
The connection EndPoint object
endPoint
,
ByteBuffer
The buffer with the first bytes of the connection
buffer
)

Overrides org.eclipse.jetty.server.DetectorConnectionFactory.nextProtocol.

Callback method invoked when the detected bytes are not TLS.

protected void
otherProtocol(ByteBuffer
The buffer with the first bytes of the connection
buffer
,
EndPoint
The connection EndPoint object
endPoint
)

Deprecated Override nextProtocol(Connector, EndPoint, ByteBuffer) instead.

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

Inherited from org.eclipse.jetty.server.DetectorConnectionFactory:
detectnewConnectionupgradeToConnectionFactory

Field Detail

_nextProtocolback to summary
private final String _nextProtocol
LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.server.DetectorConnectionFactory.LOG.

Constructor Detail

OptionalSslConnectionFactoryback to summary
public OptionalSslConnectionFactory(SslConnectionFactory sslConnectionFactory, String nextProtocol)

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

Parameters
sslConnectionFactory:SslConnectionFactory

The SslConnectionFactory to use if the first bytes are TLS

nextProtocol:String

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

nextProtocolback to summary
protected void nextProtocol(Connector connector, EndPoint endPoint, ByteBuffer buffer)

Overrides org.eclipse.jetty.server.DetectorConnectionFactory.nextProtocol.

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

Parameters
connector:Connector

The connector object

endPoint:EndPoint

The connection EndPoint object

buffer:ByteBuffer

The buffer with the first bytes of the connection

otherProtocolback to summary
protected void otherProtocol(ByteBuffer buffer, EndPoint endPoint)

Deprecated

Override nextProtocol(Connector, EndPoint, ByteBuffer) instead.

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:ByteBuffer

The buffer with the first bytes of the connection

endPoint:EndPoint

The connection EndPoint object

Annotations
@Deprecated