Package io.netty.handler.ssl
Class JdkSslEngine
- java.lang.Object
-
- javax.net.ssl.SSLEngine
-
- io.netty.handler.ssl.JdkSslEngine
-
- All Implemented Interfaces:
ApplicationProtocolAccessor
- Direct Known Subclasses:
JdkAlpnSslEngine
class JdkSslEngine extends javax.net.ssl.SSLEngine implements ApplicationProtocolAccessor
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringapplicationProtocolprivate javax.net.ssl.SSLEngineengine
-
Constructor Summary
Constructors Constructor Description JdkSslEngine(javax.net.ssl.SSLEngine engine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginHandshake()voidcloseInbound()voidcloseOutbound()java.lang.RunnablegetDelegatedTask()java.lang.String[]getEnabledCipherSuites()java.lang.String[]getEnabledProtocols()booleangetEnableSessionCreation()javax.net.ssl.SSLSessiongetHandshakeSession()javax.net.ssl.SSLEngineResult.HandshakeStatusgetHandshakeStatus()booleangetNeedClientAuth()java.lang.StringgetNegotiatedApplicationProtocol()Returns the name of the negotiated application-level protocol.java.lang.StringgetPeerHost()intgetPeerPort()javax.net.ssl.SSLSessiongetSession()javax.net.ssl.SSLParametersgetSSLParameters()java.lang.String[]getSupportedCipherSuites()java.lang.String[]getSupportedProtocols()booleangetUseClientMode()booleangetWantClientAuth()javax.net.ssl.SSLEnginegetWrappedEngine()booleanisInboundDone()booleanisOutboundDone()voidsetEnabledCipherSuites(java.lang.String[] strings)voidsetEnabledProtocols(java.lang.String[] strings)voidsetEnableSessionCreation(boolean b)voidsetNeedClientAuth(boolean b)(package private) voidsetNegotiatedApplicationProtocol(java.lang.String applicationProtocol)voidsetSSLParameters(javax.net.ssl.SSLParameters sslParameters)voidsetUseClientMode(boolean b)voidsetWantClientAuth(boolean b)javax.net.ssl.SSLEngineResultunwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer byteBuffer2)javax.net.ssl.SSLEngineResultunwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer[] byteBuffers)javax.net.ssl.SSLEngineResultunwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer[] byteBuffers, int i, int i2)javax.net.ssl.SSLEngineResultwrap(java.nio.ByteBuffer[] byteBuffers, int i, int i2, java.nio.ByteBuffer byteBuffer)javax.net.ssl.SSLEngineResultwrap(java.nio.ByteBuffer[] byteBuffers, java.nio.ByteBuffer byteBuffer)javax.net.ssl.SSLEngineResultwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer byteBuffer2)
-
-
-
Method Detail
-
getNegotiatedApplicationProtocol
public java.lang.String getNegotiatedApplicationProtocol()
Description copied from interface:ApplicationProtocolAccessorReturns the name of the negotiated application-level protocol.- Specified by:
getNegotiatedApplicationProtocolin interfaceApplicationProtocolAccessor- Returns:
- the application-level protocol name or
nullif the negotiation failed or the client does not have ALPN/NPN extension
-
setNegotiatedApplicationProtocol
void setNegotiatedApplicationProtocol(java.lang.String applicationProtocol)
-
getSession
public javax.net.ssl.SSLSession getSession()
- Specified by:
getSessionin classjavax.net.ssl.SSLEngine
-
getWrappedEngine
public javax.net.ssl.SSLEngine getWrappedEngine()
-
closeInbound
public void closeInbound() throws javax.net.ssl.SSLException- Specified by:
closeInboundin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
closeOutbound
public void closeOutbound()
- Specified by:
closeOutboundin classjavax.net.ssl.SSLEngine
-
getPeerHost
public java.lang.String getPeerHost()
- Overrides:
getPeerHostin classjavax.net.ssl.SSLEngine
-
getPeerPort
public int getPeerPort()
- Overrides:
getPeerPortin classjavax.net.ssl.SSLEngine
-
wrap
public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer byteBuffer2) throws javax.net.ssl.SSLException- Overrides:
wrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
wrap
public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[] byteBuffers, java.nio.ByteBuffer byteBuffer) throws javax.net.ssl.SSLException- Overrides:
wrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
wrap
public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[] byteBuffers, int i, int i2, java.nio.ByteBuffer byteBuffer) throws javax.net.ssl.SSLException- Specified by:
wrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
unwrap
public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer byteBuffer2) throws javax.net.ssl.SSLException- Overrides:
unwrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
unwrap
public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer[] byteBuffers) throws javax.net.ssl.SSLException- Overrides:
unwrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
unwrap
public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer byteBuffer, java.nio.ByteBuffer[] byteBuffers, int i, int i2) throws javax.net.ssl.SSLException- Specified by:
unwrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
getDelegatedTask
public java.lang.Runnable getDelegatedTask()
- Specified by:
getDelegatedTaskin classjavax.net.ssl.SSLEngine
-
isInboundDone
public boolean isInboundDone()
- Specified by:
isInboundDonein classjavax.net.ssl.SSLEngine
-
isOutboundDone
public boolean isOutboundDone()
- Specified by:
isOutboundDonein classjavax.net.ssl.SSLEngine
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuitesin classjavax.net.ssl.SSLEngine
-
getEnabledCipherSuites
public java.lang.String[] getEnabledCipherSuites()
- Specified by:
getEnabledCipherSuitesin classjavax.net.ssl.SSLEngine
-
setEnabledCipherSuites
public void setEnabledCipherSuites(java.lang.String[] strings)
- Specified by:
setEnabledCipherSuitesin classjavax.net.ssl.SSLEngine
-
getSupportedProtocols
public java.lang.String[] getSupportedProtocols()
- Specified by:
getSupportedProtocolsin classjavax.net.ssl.SSLEngine
-
getEnabledProtocols
public java.lang.String[] getEnabledProtocols()
- Specified by:
getEnabledProtocolsin classjavax.net.ssl.SSLEngine
-
setEnabledProtocols
public void setEnabledProtocols(java.lang.String[] strings)
- Specified by:
setEnabledProtocolsin classjavax.net.ssl.SSLEngine
-
getHandshakeSession
public javax.net.ssl.SSLSession getHandshakeSession()
- Overrides:
getHandshakeSessionin classjavax.net.ssl.SSLEngine
-
beginHandshake
public void beginHandshake() throws javax.net.ssl.SSLException- Specified by:
beginHandshakein classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
getHandshakeStatus
public javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus()
- Specified by:
getHandshakeStatusin classjavax.net.ssl.SSLEngine
-
setUseClientMode
public void setUseClientMode(boolean b)
- Specified by:
setUseClientModein classjavax.net.ssl.SSLEngine
-
getUseClientMode
public boolean getUseClientMode()
- Specified by:
getUseClientModein classjavax.net.ssl.SSLEngine
-
setNeedClientAuth
public void setNeedClientAuth(boolean b)
- Specified by:
setNeedClientAuthin classjavax.net.ssl.SSLEngine
-
getNeedClientAuth
public boolean getNeedClientAuth()
- Specified by:
getNeedClientAuthin classjavax.net.ssl.SSLEngine
-
setWantClientAuth
public void setWantClientAuth(boolean b)
- Specified by:
setWantClientAuthin classjavax.net.ssl.SSLEngine
-
getWantClientAuth
public boolean getWantClientAuth()
- Specified by:
getWantClientAuthin classjavax.net.ssl.SSLEngine
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean b)
- Specified by:
setEnableSessionCreationin classjavax.net.ssl.SSLEngine
-
getEnableSessionCreation
public boolean getEnableSessionCreation()
- Specified by:
getEnableSessionCreationin classjavax.net.ssl.SSLEngine
-
getSSLParameters
public javax.net.ssl.SSLParameters getSSLParameters()
- Overrides:
getSSLParametersin classjavax.net.ssl.SSLEngine
-
setSSLParameters
public void setSSLParameters(javax.net.ssl.SSLParameters sslParameters)
- Overrides:
setSSLParametersin classjavax.net.ssl.SSLEngine
-
-