public abstract class ApplicationProtocolSelector extends Object
setHandshakeApplicationProtocolSelector API, which takes a BiFunction
(available in Java 8+). This interface is provided to support protocol selection in Java < 8.| Constructor and Description |
|---|
ApplicationProtocolSelector() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
selectApplicationProtocol(SSLEngine engine,
List<String> protocols)
Selects the appropriate ALPN protocol.
|
abstract String |
selectApplicationProtocol(SSLSocket socket,
List<String> protocols)
Selects the appropriate ALPN protocol.
|
public abstract String selectApplicationProtocol(SSLEngine engine, List<String> protocols)
engine - the server-side engineprotocols - The list of client-supplied protocolsnull to indicate
that none of the advertised names are acceptable. If the return value is an empty
String then application protocol indications will not be used. If the return value
is null (no value chosen) or is a value that was not advertised by the peer, a
"no_application_protocol" alert will be sent to the peer and the connection will be
terminated.public abstract String selectApplicationProtocol(SSLSocket socket, List<String> protocols)
socket - the server-side socketprotocols - The list of client-supplied protocolsnull to indicate
that none of the advertised names are acceptable. If the return value is an empty
String then application protocol indications will not be used. If the return value
is null (no value chosen) or is a value that was not advertised by the peer, a
"no_application_protocol" alert will be sent to the peer and the connection will be
terminated.