public class DefaultSessionManager extends SessionManager
null.
A SSL client calls this method with no session id (= null).
If there already exists a session to this host the client tries to resume it.
cacheSizeLimit| Constructor and Description |
|---|
DefaultSessionManager()
Create only one sessin manager for all SSLSockets.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cacheSession(SSLTransport transport,
Session session)
Put a session into the session cache.
|
void |
clear()
Clears the contents of the SessionManager.
|
int |
getCacheSizeLimit()
Gets the size limit of the session cache.
|
long |
getResumePeriod()
Returns the resume period of this session manager.
|
protected Session |
getSession(SSLTransport transport,
java.lang.Object sessionID)
Returns a session from the cache.
|
void |
setCacheSizeLimit(int size)
Sets the size limit of the session cache.
|
void |
setResumePeriod(long period)
Sets the resume period of cached sessions.
|
java.lang.String |
toString()
Returns some statistics about the sessions cache.
|
getDefault, setDefault, setNumberOfTicketsToBeSentpublic DefaultSessionManager()
public void setResumePeriod(long period)
setResumePeriod in class SessionManagerperiod - the resume period in secondspublic long getResumePeriod()
getResumePeriod in class SessionManagerprotected void cacheSession(SSLTransport transport, Session session)
cacheSession in class SessionManagertransport - the SSLTransport which wants to cache this sessionsession - the session to cacheprotected Session getSession(SSLTransport transport, java.lang.Object sessionID)
getSession in class SessionManagertransport - the SSLTransport which wants to look for a sessionsessionID - the ID of the session which should be resumed
or null if this method is called by a SSL client.nullpublic void setCacheSizeLimit(int size)
throws java.lang.IllegalArgumentException
setCacheSizeLimit in class SessionManagersize - the size limit of the session cache; a size of 0 indicates
that the session cache size has no limitjava.lang.IllegalArgumentException - if the given size is < 0.public int getCacheSizeLimit()
getCacheSizeLimit in class SessionManagerpublic void clear()
public java.lang.String toString()
toString in class java.lang.Object