HandshakeCompletedEvent (Java SE 15 & JDK 15) (original) (raw)

All Implemented Interfaces:

[Serializable](../../../java/io/Serializable.html "interface in java.io")


public class HandshakeCompletedEvent extends EventObject

This event indicates that an SSL handshake completed on a given SSL connection. All of the core information about that handshake's result is captured through an "SSLSession" object. As a convenience, this event class provides direct access to some important session attributes.

The source of this event is the SSLSocket on which handshaking just completed.

Since:

1.4

See Also:

SSLSocket, HandshakeCompletedListener, SSLSession, Serialized Form

Constructors

Constructor Description
HandshakeCompletedEvent​(SSLSocket sock,SSLSession s) Constructs a new HandshakeCompletedEvent.
Modifier and Type Method Description
String getCipherSuite() Returns the cipher suite in use by the session which was produced by the handshake.
Certificate[] getLocalCertificates() Returns the certificate(s) that were sent to the peer during handshaking.
Principal getLocalPrincipal() Returns the principal that was sent to the peer during handshaking.
X509Certificate[] getPeerCertificateChain() Deprecated, for removal: This API element is subject to removal in a future version.
Certificate[] getPeerCertificates() Returns the identity of the peer which was established as part of defining the session.
Principal getPeerPrincipal() Returns the identity of the peer which was established as part of defining the session.
SSLSession getSession() Returns the session that triggered this event.
SSLSocket getSocket() Returns the socket which is the source of this event.