protected static class JdkBaseApplicationProtocolNegotiator.NoFailProtocolSelector extends java.lang.Object implements JdkApplicationProtocolNegotiator.ProtocolSelector
Modifier and Type | Field and Description |
---|---|
private JdkSslEngine |
jettyWrapper |
private java.util.Set<java.lang.String> |
supportedProtocols |
Constructor and Description |
---|
NoFailProtocolSelector(JdkSslEngine jettyWrapper,
java.util.Set<java.lang.String> supportedProtocols) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
noSelectMatchFound() |
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 . |
private final JdkSslEngine jettyWrapper
private final java.util.Set<java.lang.String> supportedProtocols
public NoFailProtocolSelector(JdkSslEngine jettyWrapper, java.util.Set<java.lang.String> supportedProtocols)
public void unsupported()
JdkApplicationProtocolNegotiator.ProtocolSelector
ApplicationProtocolNegotiator
.unsupported
in interface JdkApplicationProtocolNegotiator.ProtocolSelector
public java.lang.String select(java.util.List<java.lang.String> protocols) throws java.lang.Exception
JdkApplicationProtocolNegotiator.ProtocolSelector
protocols
provided.select
in interface JdkApplicationProtocolNegotiator.ProtocolSelector
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.public java.lang.String noSelectMatchFound() throws java.lang.Exception
java.lang.Exception