Package io.netty.handler.ssl
Class JdkBaseApplicationProtocolNegotiator.NoFailProtocolSelector
- java.lang.Object
-
- io.netty.handler.ssl.JdkBaseApplicationProtocolNegotiator.NoFailProtocolSelector
-
- All Implemented Interfaces:
JdkApplicationProtocolNegotiator.ProtocolSelector
- Direct Known Subclasses:
JdkBaseApplicationProtocolNegotiator.FailProtocolSelector
- Enclosing class:
- JdkBaseApplicationProtocolNegotiator
static class JdkBaseApplicationProtocolNegotiator.NoFailProtocolSelector extends java.lang.Object implements JdkApplicationProtocolNegotiator.ProtocolSelector
-
-
Field Summary
Fields Modifier and Type Field Description private JdkSslEngine
engineWrapper
private java.util.Set<java.lang.String>
supportedProtocols
-
Constructor Summary
Constructors Constructor Description NoFailProtocolSelector(JdkSslEngine engineWrapper, java.util.Set<java.lang.String> supportedProtocols)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theprotocols
provided.void
unsupported()
Callback invoked to let the application know that the peer does not support thisApplicationProtocolNegotiator
.
-
-
-
Field Detail
-
engineWrapper
private final JdkSslEngine engineWrapper
-
supportedProtocols
private final java.util.Set<java.lang.String> supportedProtocols
-
-
Constructor Detail
-
NoFailProtocolSelector
NoFailProtocolSelector(JdkSslEngine engineWrapper, java.util.Set<java.lang.String> supportedProtocols)
-
-
Method Detail
-
unsupported
public void unsupported()
Description copied from interface:JdkApplicationProtocolNegotiator.ProtocolSelector
Callback invoked to let the application know that the peer does not support thisApplicationProtocolNegotiator
.- Specified by:
unsupported
in interfaceJdkApplicationProtocolNegotiator.ProtocolSelector
-
select
public java.lang.String select(java.util.List<java.lang.String> protocols) throws java.lang.Exception
Description copied from interface:JdkApplicationProtocolNegotiator.ProtocolSelector
Callback invoked to select the application level protocol from theprotocols
provided.- Specified by:
select
in interfaceJdkApplicationProtocolNegotiator.ProtocolSelector
- Parameters:
protocols
- the protocols sent by the protocol advertiser- Returns:
- the protocol selected by this
JdkApplicationProtocolNegotiator.ProtocolSelector
. Anull
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. - Throws:
java.lang.Exception
- If theprotocols
provide warrant failing the SSL handshake with a fatal alert.
-
noSelectMatchFound
public java.lang.String noSelectMatchFound() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-