public class HandshakeCompletedEvent extends EventObject
这一事件的来源是SSLSocket握手刚刚完成的。
SSLSocket
,
HandshakeCompletedListener
,
SSLSession
,
Serialized Form
source
Constructor and Description |
---|
HandshakeCompletedEvent(SSLSocket sock, SSLSession s)
构建了一种新的handshakecompletedevent。
|
Modifier and Type | Method and Description |
---|---|
String |
getCipherSuite()
返回由握手产生的会话使用的密码套件。
|
Certificate[] |
getLocalCertificates()
返回证书(S)在发送给同伴握手。
|
Principal |
getLocalPrincipal()
返回主是在给同伴握手。
|
X509Certificate[] |
getPeerCertificateChain()
返回被确定为定义会话的一部分的对等体的身份。
|
Certificate[] |
getPeerCertificates()
返回作为定义会话定义会话的一部分而建立的对等体的身份。
|
Principal |
getPeerPrincipal()
返回作为定义会话定义会话的一部分而建立的对等体的身份。
|
SSLSession |
getSession()
返回触发此事件的会话。
|
SSLSocket |
getSocket()
返回此事件的源的套接字。
|
getSource, toString
public HandshakeCompletedEvent(SSLSocket sock, SSLSession s)
sock
- SSLSocket作为事件源的
s
- sslsession此事件相关
public SSLSession getSession()
SSLSession
握手
public String getCipherSuite()
public Certificate[] getLocalCertificates()
getLocalPrincipal()
public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException
SSLPeerUnverifiedException
如果同伴未验证。
getPeerPrincipal()
public X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException
注:此方法存在于与以前版本的兼容性。新的应用程序应使用getpeercertificates()相反。
X509Certificate
格式)。
SSLPeerUnverifiedException
如果同伴未验证。
getPeerPrincipal()
public Principal getPeerPrincipal() throws SSLPeerUnverifiedException
SSLPeerUnverifiedException
如果同伴的身份尚未证实
getPeerCertificates()
,
getLocalPrincipal()
public Principal getLocalPrincipal()
getLocalCertificates()
,
getPeerPrincipal()
public SSLSocket getSocket()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.