Package org.eclipse.jetty.alpn
Interface ALPN.ServerProvider
-
- All Superinterfaces:
ALPN.Provider
- Enclosing class:
- ALPN
public static interface ALPN.ServerProvider extends ALPN.Provider
The server-side provider interface that applications must implement to interact with the negotiation of the protocol.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
select(java.util.List<java.lang.String> protocols)
Callback invoked to let the server application select a protocol among the ones sent by the client.void
unsupported()
Callback invoked to let the server application know that the client does not support ALPN.
-
-
-
Method Detail
-
unsupported
void unsupported()
Callback invoked to let the server application know that the client does not support ALPN.
-
select
java.lang.String select(java.util.List<java.lang.String> protocols) throws javax.net.ssl.SSLException
Callback invoked to let the server application select a protocol among the ones sent by the client.
The implementation may throw an exception to indicate that the protocol negotiation is not possible, causing the connection to be closed with a TLS alert of type
no_application_protocol(120)
.- Parameters:
protocols
- the protocols sent by the client.- Returns:
- the protocol selected by the server application.
A
null
value will indicate the server will not include theALPN extension
message in theServerHello
message. This means the server appears as though it doesn't support ALPN and lets the client decide how to handle the situation. - Throws:
javax.net.ssl.SSLException
- if the protocol negotiation failed.
-
-