public class HandshakeCompletedEvent extends EventObject
HandshakeCompletedListener.handshakeCompleted(HandshakeCompletedEvent)
method of all registered listeners when a SSL handshake in a SSL
protocol is completed.source| Constructor and Description |
|---|
HandshakeCompletedEvent(SSLSocket socket,
SSLSession session)
Creates a new handshake completed event.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCipherSuite()
Returns the name of the cipher that was negotiated in this
connection.
|
Certificate[] |
getLocalCertificates()
Returns the local certificates being used in this connection.
|
Principal |
getLocalPrincipal()
Returns the local identity used in this connection, or
null if there is none. |
X509Certificate[] |
getPeerCertificateChain() |
Certificate[] |
getPeerCertificates()
Returns the peer's certificates being used in this connection.
|
Principal |
getPeerPrincipal()
Returns the peer's identity, or
null if there is
none. |
SSLSession |
getSession()
Returns the SSL session object associated with this connection.
|
SSLSocket |
getSocket()
Returns the socket over which this connection is being
negotiated.
|
getSource, toStringpublic HandshakeCompletedEvent(SSLSocket socket, SSLSession session)
socket - The socket (also the source) creating this event.session - The associated session object.NullPointerException - If session is null.public String getCipherSuite()
public Certificate[] getLocalCertificates()
public Principal getLocalPrincipal()
null if there is none.public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException
SSLPeerUnverifiedException - If the peer has not been
verified.public X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException
SSLPeerUnverifiedExceptionpublic Principal getPeerPrincipal() throws SSLPeerUnverifiedException
null if there is
none.SSLPeerUnverifiedException - If the remote peer's identity
could not be verified.public SSLSession getSession()
public SSLSocket getSocket()
EventObject.getSource() method.