iaik.security.ssl
Class Session

java.lang.Object
  |
  +--iaik.security.ssl.Session

public class Session
extends java.lang.Object
implements java.io.Serializable

A Session holds all information which is needed to resume an old session. Especially the following parameters:

See Also:
Serialized Form

Method Summary
 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.
 X509Certificate[] getPeerCertificateChain()
          Returns the peer certificate of this session.
 int getVersion()
          The protocol version used to establish this session.
 void invalidate()
          Invalidate this session.
 boolean isValid()
          Return if this session is valid, i.e.
 java.lang.String toString()
          Returns a string representation of this Session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getID

public java.lang.Object getID()
Returns the ID of this session.
Returns:
the ID of this session

getCreationTime

public long getCreationTime()
Returns the creation time of this session.
Returns:
the creation time of this session

getPeerCertificateChain

public X509Certificate[] getPeerCertificateChain()
Returns the peer certificate of this session.
Returns:
the peer certificate of this session

getMasterSecret

public byte[] getMasterSecret()
Returns the master secret of this session.
Returns:
the master secret of this session

getCipherSuite

public CipherSuite getCipherSuite()
Returns the cipher suite of this session.
Returns:
the cipher suite of this session

getCompressionMethod

public CompressionMethod getCompressionMethod()

getVersion

public int getVersion()
The protocol version used to establish this session. One of the constants defined in SSLContext.
See Also:
SSLContext.VERSION_TLS10

isValid

public boolean isValid()
Return if this session is valid, i.e. if it can be used to establish further connections.

invalidate

public void invalidate()
Invalidate this session. After this call the session can no longer be used to establish connections. This may be useful when renegotiating.
See Also:
SSLTransport.renegotiate()

toString

public java.lang.String toString()
Returns a string representation of this Session.
Overrides:
toString in class java.lang.Object
Returns:
the string representation