Package io.netty.handler.ssl
Class JdkAlpnSslEngine
java.lang.Object
javax.net.ssl.SSLEngine
io.netty.handler.ssl.JdkSslEngine
io.netty.handler.ssl.JdkAlpnSslEngine
- All Implemented Interfaces:
ApplicationProtocolAccessor
- Direct Known Subclasses:
BouncyCastleAlpnSslEngine
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer) JdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer, BiConsumer<SSLEngine, JdkAlpnSslEngine.AlpnSelector> setHandshakeApplicationProtocolSelector, BiConsumer<SSLEngine, List<String>> setApplicationProtocols) -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the negotiated application-level protocol.void(package private) voidsetNegotiatedApplicationProtocol(String applicationProtocol) unwrap(ByteBuffer src, ByteBuffer dst) unwrap(ByteBuffer src, ByteBuffer[] dsts) unwrap(ByteBuffer src, ByteBuffer[] dst, int offset, int len) private SSLEngineResultwrap(ByteBuffer[] srcs, int offset, int len, ByteBuffer dst) wrap(ByteBuffer[] srcs, ByteBuffer dst) wrap(ByteBuffer src, ByteBuffer dst) Methods inherited from class io.netty.handler.ssl.JdkSslEngine
beginHandshake, closeInbound, closeOutbound, getDelegatedTask, getEnabledCipherSuites, getEnabledProtocols, getEnableSessionCreation, getHandshakeSession, getHandshakeStatus, getNeedClientAuth, getPeerHost, getPeerPort, getSession, getSSLParameters, getSupportedCipherSuites, getSupportedProtocols, getUseClientMode, getWantClientAuth, getWrappedEngine, isInboundDone, isOutboundDone, setEnabledCipherSuites, setEnabledProtocols, setEnableSessionCreation, setNeedClientAuth, setSSLParameters, setUseClientMode, setWantClientAuth
-
Field Details
-
selectionListener
-
alpnSelector
-
-
Constructor Details
-
JdkAlpnSslEngine
JdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer, BiConsumer<SSLEngine, JdkAlpnSslEngine.AlpnSelector> setHandshakeApplicationProtocolSelector, BiConsumer<SSLEngine, List<String>> setApplicationProtocols) -
JdkAlpnSslEngine
JdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer)
-
-
Method Details
-
verifyProtocolSelection
- Throws:
SSLException
-
wrap
- Overrides:
wrapin classJdkSslEngine- Throws:
SSLException
-
wrap
- Overrides:
wrapin classJdkSslEngine- Throws:
SSLException
-
wrap
public SSLEngineResult wrap(ByteBuffer[] srcs, int offset, int len, ByteBuffer dst) throws SSLException - Overrides:
wrapin classJdkSslEngine- Throws:
SSLException
-
unwrap
- Overrides:
unwrapin classJdkSslEngine- Throws:
SSLException
-
unwrap
- Overrides:
unwrapin classJdkSslEngine- Throws:
SSLException
-
unwrap
public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dst, int offset, int len) throws SSLException - Overrides:
unwrapin classJdkSslEngine- Throws:
SSLException
-
setNegotiatedApplicationProtocol
- Overrides:
setNegotiatedApplicationProtocolin classJdkSslEngine
-
getNegotiatedApplicationProtocol
Description copied from interface:ApplicationProtocolAccessorReturns the name of the negotiated application-level protocol.- Specified by:
getNegotiatedApplicationProtocolin interfaceApplicationProtocolAccessor- Overrides:
getNegotiatedApplicationProtocolin classJdkSslEngine- Returns:
- the application-level protocol name or
nullif the negotiation failed or the client does not have ALPN/NPN extension
-
getApplicationProtocol
- Overrides:
getApplicationProtocolin classSSLEngine
-
getHandshakeApplicationProtocol
- Overrides:
getHandshakeApplicationProtocolin classSSLEngine
-
setHandshakeApplicationProtocolSelector
public void setHandshakeApplicationProtocolSelector(BiFunction<SSLEngine, List<String>, String> selector) - Overrides:
setHandshakeApplicationProtocolSelectorin classSSLEngine
-
getHandshakeApplicationProtocolSelector
- Overrides:
getHandshakeApplicationProtocolSelectorin classSSLEngine
-