iaik.security.ssl
Class SessionManager
java.lang.Object
|
+--iaik.security.ssl.SessionManager
- Direct Known Subclasses:
- DefaultSessionManager
- public abstract class SessionManager
- extends java.lang.Object
An abstract parent class of all SessionManagers. A SessionManager keeps
track of session ids and associated session parameters to allow for a
faster SSL handshake.
This class also stores the system's default session manager.
- See Also:
DefaultSessionManager,
Session
|
Constructor Summary |
protected |
SessionManager()
Constructor for use by subclasses. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SessionManager
protected SessionManager()
- Constructor for use by subclasses.
getDefault
public static SessionManager getDefault()
- Get the current session manager. Null if session caching is disabled,
Initially set to an instance of DefaultSessionManager.
- Returns:
- the current session manager
setDefault
public static void setDefault(SessionManager manager)
- Set the session manager. Set to null to disable session caching for
all SSLContexts created after (!) this call.
cacheSession
protected abstract void cacheSession(SSLTransport transport,
Session session)
- Add this session to the session cache.
- Parameters:
socket - the socket which wants to cache this sessionsession - the session to cache
getSession
protected abstract Session getSession(SSLTransport transport,
java.lang.Object sessionID)
- Get a session from the session cache.
Notice, that there is a difference whether this method is called from
a client or a server.
- CLIENT: A client SSLSocket calls this method with the InetAddress of
the server and no sessionID (= null). The sessionID is taken
from the session.
- SERVER: A server SSLSocket calls this mehtod with the InetAddress of
the client and the sessionID the client tries to resume.
- Parameters:
socket - the socket which wants to look for a sessionsessionID - a SessionID or null- Returns:
null if the session is not in the cache or the
SessionManager wont resume this session; the cached session otherwise