public static interface JdkApplicationProtocolNegotiator.ProtocolSelector
unsupported()
OR select(List)
will be called for each SSL
handshake.限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
select(java.util.List<java.lang.String> protocols)
Callback invoked to select the application level protocol from the
protocols provided. |
void |
unsupported()
Callback invoked to let the application know that the peer does not support this
ApplicationProtocolNegotiator . |
void unsupported()
ApplicationProtocolNegotiator
.java.lang.String select(java.util.List<java.lang.String> protocols) throws java.lang.Exception
protocols
provided.protocols
- the protocols sent by the protocol advertiserJdkApplicationProtocolNegotiator.ProtocolSelector
. A null
value will indicate the no
protocols were selected but the handshake should not fail. The decision to fail the handshake is left to the
other end negotiating the SSL handshake.java.lang.Exception
- If the protocols
provide warrant failing the SSL handshake with a fatal alert.