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()
返回在握手期间发送给对等体的证书。
|
Principal |
getLocalPrincipal()
返回在握手期间发送给对等体的主体。
|
X509Certificate[] |
getPeerCertificateChain()
返回被确定为定义会话一部分的对等体的身份。
|
Certificate[] |
getPeerCertificates()
返回作为定义会话的一部分而建立的对等体的身份。
|
Principal |
getPeerPrincipal()
返回作为定义会话的一部分而建立的对等体的身份。
|
SSLSession |
getSession()
返回触发此事件的会话。
|
SSLSocket |
getSocket()
返回作为此事件源的套接字。
|
getSource, toStringpublic HandshakeCompletedEvent(SSLSocket sock, SSLSession s)
sock - SSLSocket作为事件的来源
s - 这个事件关联的SSLSession
public SSLSession getSession()
SSLSession的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.