Skip to Content
Java in a Nutshell, 5th Edition
book

Java in a Nutshell, 5th Edition

by David Flanagan
March 2005
Intermediate to advanced
1254 pages
104h 21m
English
O'Reilly Media, Inc.
Content preview from Java in a Nutshell, 5th Edition

Name

HandshakeCompletedEvent

Synopsis

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.

javax.net.ssl.HandshakeCompletedEvent

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java in a Nutshell, 8th Edition

Java in a Nutshell, 8th Edition

Benjamin J. Evans, Jason Clark, David Flanagan
Java in a Nutshell, 7th Edition

Java in a Nutshell, 7th Edition

Benjamin J. Evans, David Flanagan
Learning Java, 5th Edition

Learning Java, 5th Edition

Marc Loy, Patrick Niemeyer, Daniel Leuck
Learning Java, 4th Edition

Learning Java, 4th Edition

Patrick Niemeyer, Daniel Leuck

Publisher Resources

ISBN: 0596007736Supplemental ContentErrata Page