public class Session
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Gets a clone of this Session.
|
boolean |
equals(java.lang.Object object)
Compares two Session objects.
|
CipherSuite |
getCipherSuite()
Returns the cipher suite of this session.
|
CompressionMethod |
getCompressionMethod() |
long |
getCreationTime()
Returns the creation time of this session.
|
java.lang.Object |
getID()
Returns the ID of this session.
|
byte[] |
getMasterSecret()
Returns the master secret of this session.
|
java.security.cert.X509Certificate[] |
getPeerCertificateChain()
Returns the peer certificate of this session.
|
java.lang.String |
getPSKIdentity()
Returns the PSK identity of this session (if a PSK cipher
suite is used by this session).
|
int |
getVersion()
The protocol version used to establish this session.
|
int |
hashCode()
Creates an integer suitable for hash table indexing.
|
void |
invalidate()
Invalidate this session.
|
boolean |
isValid()
Return if this session is valid, i.e. if it can be used to establish
further connections.
|
java.lang.String |
toString()
Returns a string representation of this Session.
|
public java.lang.Object getID()
public long getCreationTime()
public java.security.cert.X509Certificate[] getPeerCertificateChain()
null
if the peer has not send a certificatepublic java.lang.String getPSKIdentity()
null
if no PSK cipher suite is used
by this sessionpublic byte[] getMasterSecret()
public CipherSuite getCipherSuite()
public CompressionMethod getCompressionMethod()
public int getVersion()
SSLContext.VERSION_TLS10
public boolean isValid()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the Session to compare againstpublic void invalidate()
SSLTransport.renegotiate()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object