An instance of this class is passed to the
handshakeCompleted( ) method of any registered
HandshakeCompletedListener objects by an
SSLSocket when that socket completes the handshake
phase of establishing a connection. The various methods of a
HandshakeCompletedEvent return information (such
as the name of the cipher suite in use and the
certificate chain of the remote host) that was determined during that
handshake.
Note that the getPeerCertificateChain(
) method returns an object from the
javax.security.cert package, which is not
documented in this book. The method and package exist only for
backward compatibility with earlier versions of the JSSE API, and
should be considered deprecated. Use getPeerCertificates(
), which uses
java.security.cert instead.
Figure 18-2. javax.net.ssl.HandshakeCompletedEvent
public class
HandshakeCompletedEvent extends java.util.EventObject {
// Public Constructors
public
HandshakeCompletedEvent (SSLSocket
sock , SSLSession
s );
// Public Instance Methods
public String
getCipherSuite ( );
public java.security.cert.Certificate[ ]
getLocalCertificates ( );
5.0 public java.security.Principal
getLocalPrincipal ( );
public javax.security.cert.X509Certificate[ ]
getPeerCertificateChain ( )
throws SSLPeerUnverifiedException;
public java.security.cert.Certificate[ ]
getPeerCertificates ( )
throws SSLPeerUnverifiedException;
5.0 public java.security.Principal
getPeerPrincipal ( ) throws SSLPeerUnverifiedException;
public SSLSession
getSession ( );
public SSLSocket
getSocket ( );
}