|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.security.ssl.SessionManager
public abstract class SessionManager
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.
DefaultSessionManager
,
Session
Field Summary | |
---|---|
protected int |
cacheSizeLimit
Maxiumum size of the session cache (default: 0 so that there is no limit). |
Constructor Summary | |
---|---|
protected |
SessionManager()
Constructor for use by subclasses. |
Method Summary | |
---|---|
protected abstract void |
cacheSession(SSLTransport transport,
Session session)
Add this session to the session cache. |
int |
getCacheSizeLimit()
Gets the size limit of the session cache. |
static SessionManager |
getDefault()
Get the current session manager. |
long |
getResumePeriod()
Returns the resume period of this session manager. |
protected abstract Session |
getSession(SSLTransport transport,
java.lang.Object sessionID)
Get a session from the session cache. |
void |
setCacheSizeLimit(int size)
Sets the size limit of the session cache. |
static void |
setDefault(SessionManager manager)
Set the session manager. |
void |
setNumberOfTicketsToBeSent(int n)
Sets the number of tickets to be sent to the client. |
void |
setResumePeriod(long period)
Sets the resume period of cached sessions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int cacheSizeLimit
Constructor Detail |
---|
protected SessionManager()
Method Detail |
---|
public static SessionManager getDefault()
public static void setDefault(SessionManager manager)
protected abstract void cacheSession(SSLTransport transport, Session session)
session
- the session to cachetransport
- the transportprotected abstract Session getSession(SSLTransport transport, java.lang.Object sessionID)
transport
- the transportsessionID
- a SessionID or null
null
if the session is not in the cache or the
SessionManager wont resume this session; the cached session otherwisepublic void setCacheSizeLimit(int size) throws java.lang.IllegalArgumentException
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()
public void setResumePeriod(long period)
period
- the resume period in secondspublic long getResumePeriod()
public void setNumberOfTicketsToBeSent(int n)
Only meaningful for TLS 1.3 and on the server side.
In TLS 1.3, after having successfully established a session the server can send one or more NewSessionTicket messages to client. Each NewSessionTicket message contains a ticket the client may use to later indicate a session it wants to resume. With this method the number of tickets (and therefore NewSessionTicket) messages can be configured that a TLS 1.3 server shall send to the client. Each NewSessionTicket message will contain a new ticket but will refer to the same base session to may be resumed later on.
n
- the number of tickets to be sent to the client (default: 1).
|
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 |