setHandshakeApplicationProtocolSelector API, which takes a BiFunction
(available in Java 8+). This interface is provided to support protocol selection in Java < 8.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract String | Returns: The function's result is an application protocol name, ornull 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.the server-side engine engine, List<String> The list of client-supplied protocols protocols)Selects the appropriate ALPN protocol. |
| public abstract String | Returns: The function's result is an application protocol name, ornull 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.the server-side socket socket, List<String> The list of client-supplied protocols protocols)Selects the appropriate ALPN protocol. |
| ApplicationProtocolSelector | back to summary |
|---|---|
| public ApplicationProtocolSelector() | |
| selectApplicationProtocol | back to summary |
|---|---|
| public abstract String selectApplicationProtocol(SSLEngine engine, List<String> protocols) Selects the appropriate ALPN protocol.
| |
| selectApplicationProtocol | back to summary |
|---|---|
| public abstract String selectApplicationProtocol(SSLSocket socket, List<String> protocols) Selects the appropriate ALPN protocol.
| |