SSLSessionContext (Java SE 15 & JDK 15) (original) (raw)


public interface SSLSessionContext

A SSLSessionContext represents a set ofSSLSessions associated with a single entity. For example, it could be associated with a server or client who participates in many sessions concurrently.

Not all environments will contain session contexts. For example, stateless session resumption.

Session contexts may not contain all sessions. For example, stateless sessions are not stored in the session context.

There are SSLSessionContext parameters that affect how sessions are stored:

A session can be retrieved based on its session id, and all session id's in a SSLSessionContext can be listed.

Since:

1.4

See Also:

SSLSession

Modifier and Type Method Description
Enumeration<byte[]> getIds() Returns an Enumeration of all known session id's grouped under thisSSLSessionContext.
SSLSession getSession​(byte[] sessionId) Returns the SSLSession bound to the specified session id.
int getSessionCacheSize() Returns the size of the cache used for storing SSLSession objects grouped under this SSLSessionContext.
int getSessionTimeout() Returns the timeout limit of SSLSession objects grouped under this SSLSessionContext.
void setSessionCacheSize​(int size) Sets the size of the cache used for storing SSLSession objects grouped under this SSLSessionContext.
void setSessionTimeout​(int seconds) Sets the timeout limit for SSLSession objects grouped under this SSLSessionContext.