Package javax.net.ssl
Interface SSLSessionContext
-
- All Known Implementing Classes:
ClientSessionContext,ServerSessionContext
public interface SSLSessionContextA collection ofSSLSessions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Enumeration<byte[]>getIds()Returns an iterable of all session identifiers in this session context.SSLSessiongetSession(byte[] sessionId)Returns the session for the specified session identifier.intgetSessionCacheSize()Returns the size of the session cache for this session context.intgetSessionTimeout()Returns the timeout for sessions in this session context.voidsetSessionCacheSize(int size)Sets the size of the session cache for this session context.voidsetSessionTimeout(int seconds)Sets the timeout for sessions in this context.
-
-
-
Method Detail
-
getIds
Enumeration<byte[]> getIds()
Returns an iterable of all session identifiers in this session context.- Returns:
- an iterable of all session identifiers in this session context.
-
getSession
SSLSession getSession(byte[] sessionId)
Returns the session for the specified session identifier.- Parameters:
sessionId- the session identifier of the session to look up.- Returns:
- the session for the specified session identifier, or
nullif the specified session identifier does not refer to a session in this context.
-
getSessionCacheSize
int getSessionCacheSize()
Returns the size of the session cache for this session context.- Returns:
- the size of the session cache for this session context, or
zeroif unlimited.
-
getSessionTimeout
int getSessionTimeout()
Returns the timeout for sessions in this session context. Sessions exceeding the timeout are invalidated.- Returns:
- the timeout in seconds, or
zeroif unlimited.
-
setSessionCacheSize
void setSessionCacheSize(int size) throws IllegalArgumentExceptionSets the size of the session cache for this session context.- Parameters:
size- the size of the session cache, orzerofor unlimited cache size.- Throws:
IllegalArgumentException- ifsizeis negative.
-
setSessionTimeout
void setSessionTimeout(int seconds) throws IllegalArgumentExceptionSets the timeout for sessions in this context. Sessions exceeding the timeout are invalidated.- Parameters:
seconds- the timeout in seconds, orzeroif unlimited.- Throws:
IllegalArgumentException- ifsecondsis negative.
-
-