HandshakeCompletedEvent


HandshakeCompletedEvent javax.net.ssl

Java 1.4 serializable event

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  ( );   } 

Passed To

HandshakeCompletedListener.handshakeCompleted( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net