public class ReferenceCountedOpenSslEngine extends javax.net.ssl.SSLEngine implements ReferenceCounted
SSLEngine
使用OpenSSL BIO abstractions 。
这个类的实例必须是released
,否则本机内存会泄漏!
这个类的实例必须在之前发布ReferenceCountedOpenSslContext
实例取决于被释放。 否则,如果调用此类的任何方法,并且使用ReferenceCountedOpenSslContext
JNI资源,那么JVM可能会崩溃。
Modifier and Type | Method and Description |
---|---|
void |
beginHandshake() |
void |
closeInbound() |
void |
closeOutbound() |
java.lang.Runnable |
getDelegatedTask() |
java.lang.String[] |
getEnabledCipherSuites() |
java.lang.String[] |
getEnabledProtocols() |
boolean |
getEnableSessionCreation() |
javax.net.ssl.SSLSession |
getHandshakeSession() |
javax.net.ssl.SSLEngineResult.HandshakeStatus |
getHandshakeStatus() |
boolean |
getNeedClientAuth() |
java.lang.String |
getNegotiatedApplicationProtocol()
返回协商的应用程序级协议的名称。
|
byte[] |
getOcspResponse()
如果服务器未提供装订的OCSP响应,则返回OCSP响应或
null 。
|
javax.net.ssl.SSLSession |
getSession() |
javax.net.ssl.SSLParameters |
getSSLParameters() |
java.lang.String[] |
getSupportedCipherSuites() |
java.lang.String[] |
getSupportedProtocols() |
boolean |
getUseClientMode() |
boolean |
getWantClientAuth() |
boolean |
isInboundDone() |
boolean |
isOutboundDone() |
int |
refCnt()
返回此对象的引用计数。
|
boolean |
release()
通过减小引用计数
1 并且如果所述引用计数达到在将释放该对象
0 。
|
boolean |
release(int decrement)
减小由指定的引用计数
decrement 并且如果所述引用计数达到在将释放该对象
0 。
|
ReferenceCounted |
retain()
将引用计数增加
1 。
|
ReferenceCounted |
retain(int increment)
通过指定的
increment 增加引用计数。
|
void |
setEnabledCipherSuites(java.lang.String[] cipherSuites) |
void |
setEnabledProtocols(java.lang.String[] protocols)
TLS不支持从客户端的角度发布非连续版本的方法,客户端只是通告最大支持版本。
|
void |
setEnableSessionCreation(boolean b) |
void |
setNeedClientAuth(boolean b) |
void |
setOcspResponse(byte[] response)
设置OCSP响应。
|
void |
setSSLParameters(javax.net.ssl.SSLParameters sslParameters) |
void |
setUseClientMode(boolean clientMode) |
void |
setVerify(int verifyMode, int depth)
见
SSL_set_verify和
SSL.setVerify(long, int, int) 。
|
void |
setWantClientAuth(boolean b) |
void |
shutdown()
摧毁这个引擎。
|
long |
sslPointer()
返回指向此 ReferenceCountedOpenSslEngine 的SSL 对象的指针。
|
ReferenceCounted |
touch()
记录此对象的当前访问位置以进行调试。
|
ReferenceCounted |
touch(java.lang.Object hint)
记录此对象的当前访问位置,并附加一些用于调试的任意信息。
|
javax.net.ssl.SSLEngineResult |
unwrap(java.nio.ByteBuffer[] srcs, java.nio.ByteBuffer[] dsts) |
javax.net.ssl.SSLEngineResult |
unwrap(java.nio.ByteBuffer[] srcs, int srcsOffset, int srcsLength, java.nio.ByteBuffer[] dsts, int dstsOffset, int dstsLength) |
javax.net.ssl.SSLEngineResult |
unwrap(java.nio.ByteBuffer src, java.nio.ByteBuffer dst) |
javax.net.ssl.SSLEngineResult |
unwrap(java.nio.ByteBuffer src, java.nio.ByteBuffer[] dsts) |
javax.net.ssl.SSLEngineResult |
unwrap(java.nio.ByteBuffer src, java.nio.ByteBuffer[] dsts, int offset, int length) |
javax.net.ssl.SSLEngineResult |
wrap(java.nio.ByteBuffer[] srcs, int offset, int length, java.nio.ByteBuffer dst) |
javax.net.ssl.SSLEngineResult |
wrap(java.nio.ByteBuffer src, java.nio.ByteBuffer dst) |
@UnstableApi public void setOcspResponse(byte[] response)
@UnstableApi public byte[] getOcspResponse()
null
。
public final int refCnt()
ReferenceCounted
复制的描述
0
,则表示该对象已被释放。
refCnt
,界面
ReferenceCounted
public final ReferenceCounted retain()
ReferenceCounted
复制的描述
1
。
retain
,界面
ReferenceCounted
public final ReferenceCounted retain(int increment)
ReferenceCounted
复制的描述
increment
增加参考计数。
retain
在界面
ReferenceCounted
public final ReferenceCounted touch()
ReferenceCounted
touch
在界面
ReferenceCounted
public final ReferenceCounted touch(java.lang.Object hint)
ReferenceCounted
复制的描述
ResourceLeakDetector
提供给您。
touch
在界面
ReferenceCounted
public final boolean release()
ReferenceCounted
复制的描述
1
并且如果所述引用计数达到在将释放该对象
0
。
release
在界面
ReferenceCounted
true
当且仅当引用计数变为
0
且此对象已被释放
public final boolean release(int decrement)
ReferenceCounted
复制的描述
decrement
并且如果所述引用计数达到在将释放该对象
0
。
release
在界面
ReferenceCounted
true
当且仅当引用计数变为
0
且此对象已被释放
public final javax.net.ssl.SSLSession getHandshakeSession()
getHandshakeSession
在类
javax.net.ssl.SSLEngine
public final long sslPointer()
public final void shutdown()
public final javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[] srcs, int offset, int length, java.nio.ByteBuffer dst) throws javax.net.ssl.SSLException
wrap
在课堂上
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public final javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer[] srcs, int srcsOffset, int srcsLength, java.nio.ByteBuffer[] dsts, int dstsOffset, int dstsLength) throws javax.net.ssl.SSLException
javax.net.ssl.SSLException
public final javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer[] srcs, java.nio.ByteBuffer[] dsts) throws javax.net.ssl.SSLException
javax.net.ssl.SSLException
public final javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer src, java.nio.ByteBuffer[] dsts, int offset, int length) throws javax.net.ssl.SSLException
unwrap
在课堂上
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public final javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer src, java.nio.ByteBuffer dst) throws javax.net.ssl.SSLException
wrap
在课堂上
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public final javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer src, java.nio.ByteBuffer dst) throws javax.net.ssl.SSLException
unwrap
在课堂上
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public final javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer src, java.nio.ByteBuffer[] dsts) throws javax.net.ssl.SSLException
unwrap
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public final java.lang.Runnable getDelegatedTask()
getDelegatedTask
在课堂上
javax.net.ssl.SSLEngine
public final void closeInbound() throws javax.net.ssl.SSLException
closeInbound
在课堂上
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public final boolean isInboundDone()
isInboundDone
在课堂上
javax.net.ssl.SSLEngine
public final void closeOutbound()
closeOutbound
在课堂上
javax.net.ssl.SSLEngine
public final boolean isOutboundDone()
isOutboundDone
javax.net.ssl.SSLEngine
public final java.lang.String[] getSupportedCipherSuites()
getSupportedCipherSuites
在课堂上
javax.net.ssl.SSLEngine
public final java.lang.String[] getEnabledCipherSuites()
getEnabledCipherSuites
在课堂上
javax.net.ssl.SSLEngine
public final void setEnabledCipherSuites(java.lang.String[] cipherSuites)
setEnabledCipherSuites
在课堂上
javax.net.ssl.SSLEngine
public final java.lang.String[] getSupportedProtocols()
getSupportedProtocols
在课堂上
javax.net.ssl.SSLEngine
public final java.lang.String[] getEnabledProtocols()
getEnabledProtocols
在课堂上
javax.net.ssl.SSLEngine
public final void setEnabledProtocols(java.lang.String[] protocols)
setEnabledProtocols
在课堂上
javax.net.ssl.SSLEngine
public final javax.net.ssl.SSLSession getSession()
getSession
在课堂上
javax.net.ssl.SSLEngine
public final void beginHandshake() throws javax.net.ssl.SSLException
beginHandshake
在课堂上
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public final javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus()
getHandshakeStatus
在课堂上
javax.net.ssl.SSLEngine
public final void setUseClientMode(boolean clientMode)
setUseClientMode
在课堂
javax.net.ssl.SSLEngine
public final boolean getUseClientMode()
getUseClientMode
在课堂
javax.net.ssl.SSLEngine
public final void setNeedClientAuth(boolean b)
setNeedClientAuth
在课堂上
javax.net.ssl.SSLEngine
public final boolean getNeedClientAuth()
getNeedClientAuth
在课堂上
javax.net.ssl.SSLEngine
public final void setWantClientAuth(boolean b)
setWantClientAuth
在课程
javax.net.ssl.SSLEngine
public final boolean getWantClientAuth()
getWantClientAuth
在课堂上
javax.net.ssl.SSLEngine
@UnstableApi public final void setVerify(int verifyMode, int depth)
SSL.setVerify(long, int, int)
。
public final void setEnableSessionCreation(boolean b)
setEnableSessionCreation
javax.net.ssl.SSLEngine
public final boolean getEnableSessionCreation()
getEnableSessionCreation
在课堂上
javax.net.ssl.SSLEngine
public final javax.net.ssl.SSLParameters getSSLParameters()
getSSLParameters
javax.net.ssl.SSLEngine
public final void setSSLParameters(javax.net.ssl.SSLParameters sslParameters)
setSSLParameters
在类
javax.net.ssl.SSLEngine
public java.lang.String getNegotiatedApplicationProtocol()
null
应用级协议名称或
null
Copyright © 2008–2018 The Netty Project. All rights reserved.