Package org.conscrypt
Class ServerSessionContext
- java.lang.Object
-
- org.conscrypt.AbstractSessionContext
-
- org.conscrypt.ServerSessionContext
-
- All Implemented Interfaces:
javax.net.ssl.SSLSessionContext
@Internal public final class ServerSessionContext extends AbstractSessionContext
Caches server sessions. Indexes by session ID. Users typically look up sessions using the ID provided by an SSL client.
-
-
Field Summary
Fields Modifier and Type Field Description private SSLServerSessionCache
persistentCache
-
Fields inherited from class org.conscrypt.AbstractSessionContext
sslCtxNativePointer
-
-
Constructor Summary
Constructors Constructor Description ServerSessionContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) NativeSslSession
getSessionFromPersistentCache(byte[] sessionId)
Called for server sessions only.(package private) void
onBeforeAddSession(NativeSslSession session)
Called when the given session is about to be added.(package private) void
onBeforeRemoveSession(NativeSslSession session)
Called when a session is about to be removed.void
setPersistentCache(SSLServerSessionCache persistentCache)
Applications should not use this method.-
Methods inherited from class org.conscrypt.AbstractSessionContext
cacheSession, finalize, getIds, getSession, getSessionCacheSize, getSessionFromCache, getSessionTimeout, removeSession, setSessionCacheSize, setSessionTimeout
-
-
-
-
Field Detail
-
persistentCache
private SSLServerSessionCache persistentCache
-
-
Method Detail
-
setPersistentCache
public void setPersistentCache(SSLServerSessionCache persistentCache)
Applications should not use this method. Instead useConscrypt.setServerSessionCache(SSLContext, SSLServerSessionCache)
.
-
getSessionFromPersistentCache
NativeSslSession getSessionFromPersistentCache(byte[] sessionId)
Description copied from class:AbstractSessionContext
Called for server sessions only. Retrieves the session by ID from the persistent cache.Visible for extension only, not intended to be called directly.
- Specified by:
getSessionFromPersistentCache
in classAbstractSessionContext
-
onBeforeAddSession
void onBeforeAddSession(NativeSslSession session)
Description copied from class:AbstractSessionContext
Called when the given session is about to be added. Used byClientSessionContext
to update its host-and-port based cache.Visible for extension only, not intended to be called directly.
- Specified by:
onBeforeAddSession
in classAbstractSessionContext
-
onBeforeRemoveSession
void onBeforeRemoveSession(NativeSslSession session)
Description copied from class:AbstractSessionContext
Called when a session is about to be removed. Used byClientSessionContext
to update its host-and-port based cache.Visible for extension only, not intended to be called directly.
- Specified by:
onBeforeRemoveSession
in classAbstractSessionContext
-
-