Package javax.net.ssl
Class HandshakeCompletedEvent
java.lang.Object
java.util.EventObject
javax.net.ssl.HandshakeCompletedEvent
- All Implemented Interfaces:
Serializable
public class HandshakeCompletedEvent extends EventObject
The event object encapsulating the information about a completed SSL
handshake on a SSL connection.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HandshakeCompletedEvent(SSLSocket sock, SSLSession s)Creates a newHandshakeCompletedEventwith the specified SSL socket and SSL session. -
Method Summary
Modifier and Type Method Description StringgetCipherSuite()Returns the name of the cipher suite negotiated during this handshake.Certificate[]getLocalCertificates()Returns the list of local certificates used during the handshake.PrincipalgetLocalPrincipal()Returns thePrincipalused 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.PrincipalgetPeerPrincipal()Returns thePrincipalidentifying the peer.SSLSessiongetSession()Returns the SSL session associated with this event.SSLSocketgetSocket()Returns the SSL socket that produced this event.
-
Constructor Details
-
HandshakeCompletedEvent
Creates a newHandshakeCompletedEventwith the specified SSL socket and SSL session.- Parameters:
sock- the SSL socket.s- the SSL session.
-
-
Method Details
-
getSession
Returns the SSL session associated with this event.- Returns:
- the SSL session associated with this event.
-
getCipherSuite
Returns the name of the cipher suite negotiated during this handshake.- Returns:
- the name of the cipher suite negotiated during this handshake.
-
getLocalCertificates
Returns the list of local certificates used during the handshake. These certificates were sent to the peer.- Returns:
- Returns the list of certificates used during the handshake with
the local identity certificate followed by CAs, or
nullif no certificates were used during the handshake.
-
getPeerCertificates
Return the list of certificates identifying the peer during the handshake.- Returns:
- 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.
-
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:
- the list of certificates identifying the peer
- Throws:
SSLPeerUnverifiedException- if the identity of the peer has not been verified.
-
getPeerPrincipal
Returns thePrincipalidentifying the peer.- Returns:
- the
Principalidentifying the peer. - Throws:
SSLPeerUnverifiedException- if the identity of the peer has not been verified.
-
getLocalPrincipal
Returns thePrincipalused to identify during the handshake.- Returns:
- the
Principalused to identify during the handshake.
-
getSocket
Returns the SSL socket that produced this event.- Returns:
- the SSL socket that produced this event.
-