Skip to content

Most visited

Recently visited

navigation
Added in API level 1

HandshakeCompletedEvent

public class HandshakeCompletedEvent
extends EventObject

java.lang.Object
   ↳ java.util.EventObject
     ↳ javax.net.ssl.HandshakeCompletedEvent


The event object encapsulating the information about a completed SSL handshake on a SSL connection.

Summary

Inherited fields

From class java.util.EventObject

Public constructors

HandshakeCompletedEvent(SSLSocket sock, SSLSession s)

Creates a new HandshakeCompletedEvent with the specified SSL socket and SSL session.

Public methods

String getCipherSuite()

Returns the name of the cipher suite negotiated during this handshake.

Certificate[] getLocalCertificates()

Returns the list of local certificates used during the handshake.

Principal getLocalPrincipal()

Returns the Principal used to identify during the handshake.

X509Certificate[] getPeerCertificateChain()

Returns the list of certificates identifying the peer.

Certificate[] getPeerCertificates()

Return the list of certificates identifying the peer during the handshake.

Principal getPeerPrincipal()

Returns the Principal identifying the peer.

SSLSession getSession()

Returns the SSL session associated with this event.

SSLSocket getSocket()

Returns the SSL socket that produced this event.

Inherited methods

From class java.util.EventObject
From class java.lang.Object

Public constructors

HandshakeCompletedEvent

Added in API level 1
HandshakeCompletedEvent (SSLSocket sock, 
                SSLSession s)

Creates a new HandshakeCompletedEvent with the specified SSL socket and SSL session.

Parameters
sock SSLSocket: the SSL socket.
s SSLSession: the SSL session.

Public methods

getCipherSuite

Added in API level 1
String getCipherSuite ()

Returns the name of the cipher suite negotiated during this handshake.

Returns
String the name of the cipher suite negotiated during this handshake.

getLocalCertificates

Added in API level 1
Certificate[] getLocalCertificates ()

Returns the list of local certificates used during the handshake. These certificates were sent to the peer.

Returns
Certificate[] Returns the list of certificates used during the handshake with the local identity certificate followed by CAs, or null if no certificates were used during the handshake.

getLocalPrincipal

Added in API level 1
Principal getLocalPrincipal ()

Returns the Principal used to identify during the handshake.

Returns
Principal the Principal used to identify during the handshake.

getPeerCertificateChain

Added in API level 1
X509Certificate[] getPeerCertificateChain ()

Returns the list of certificates identifying the peer. The peer's identity certificate is followed by the validated certificate authority certificates.

Replaced by: getPeerCertificates()

Returns
X509Certificate[] the list of certificates identifying the peer
Throws
SSLPeerUnverifiedException if the identity of the peer has not been verified.

getPeerCertificates

Added in API level 1
Certificate[] getPeerCertificates ()

Return the list of certificates identifying the peer during the handshake.

Returns
Certificate[] the list of certificates identifying the peer with the peer's identity certificate followed by CAs.
Throws
SSLPeerUnverifiedException if the identity of the peer has not been verified.

getPeerPrincipal

Added in API level 1
Principal getPeerPrincipal ()

Returns the Principal identifying the peer.

Returns
Principal the Principal identifying the peer.
Throws
SSLPeerUnverifiedException if the identity of the peer has not been verified.

getSession

Added in API level 1
SSLSession getSession ()

Returns the SSL session associated with this event.

Returns
SSLSession the SSL session associated with this event.

getSocket

Added in API level 1
SSLSocket getSocket ()

Returns the SSL socket that produced this event.

Returns
SSLSocket the SSL socket that produced this event.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.