|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.security.ssl.SessionManager iaik.security.ssl.DefaultSessionManager
public class DefaultSessionManager
This class implements a simple Default SessionManager.
Sessions are stored with the IP address of the peer as key. To get a session
from the cache a SSL server calls getSession(addr, id) with the IP address of
the client and the session id if the client wants to resume a previous session.
If there is no session in the cache or if the cached session has a differend id
this method returns 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.
Field Summary |
---|
Fields inherited from class iaik.security.ssl.SessionManager |
---|
cacheSizeLimit |
Constructor Summary | |
---|---|
DefaultSessionManager()
Create only one sessin manager for all SSLSockets. |
Method Summary | |
---|---|
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. |
Methods inherited from class iaik.security.ssl.SessionManager |
---|
getDefault, setDefault, setNumberOfTicketsToBeSent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultSessionManager()
Method Detail |
---|
public void setResumePeriod(long period)
setResumePeriod
in class SessionManager
period
- the resume period in secondspublic long getResumePeriod()
getResumePeriod
in class SessionManager
protected void cacheSession(SSLTransport transport, Session session)
cacheSession
in class SessionManager
transport
- the SSLTransport which wants to cache this sessionsession
- the session to cacheprotected Session getSession(SSLTransport transport, java.lang.Object sessionID)
getSession
in class SessionManager
transport
- 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.
null
public void setCacheSizeLimit(int size) throws java.lang.IllegalArgumentException
setCacheSizeLimit
in class SessionManager
size
- the size limit of the session cache; a size of 0 indicates
that the session cache size has no limit
java.lang.IllegalArgumentException
- if the given size is < 0.public int getCacheSizeLimit()
getCacheSizeLimit
in class SessionManager
public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |