public final class Handshake extends Object
This value object describes a completed handshake. Use SSLSocketFactory to set policy for new handshakes.
| Modifier and Type | Method and Description |
|---|---|
String |
cipherSuite()
Returns a cipher suite name like "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA".
|
boolean |
equals(Object other)
Compares this instance with the specified object and indicates if they
are equal.
|
static Handshake |
get(SSLSession session) |
static Handshake |
get(String cipherSuite,
List<Certificate> peerCertificates,
List<Certificate> localCertificates) |
int |
hashCode()
Returns an integer hash code for this object.
|
List<Certificate> |
localCertificates()
Returns a possibly-empty list of certificates that identify this peer.
|
Principal |
localPrincipal()
Returns the local principle, or null if this peer is anonymous.
|
List<Certificate> |
peerCertificates()
Returns a possibly-empty list of certificates that identify the remote peer.
|
Principal |
peerPrincipal()
Returns the remote peer's principle, or null if that peer is anonymous.
|
public static Handshake get(SSLSession session)
public static Handshake get(String cipherSuite, List<Certificate> peerCertificates, List<Certificate> localCertificates)
public String cipherSuite()
public List<Certificate> peerCertificates()
public Principal peerPrincipal()
public List<Certificate> localCertificates()
public Principal localPrincipal()
public boolean equals(Object other)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectother - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object)