Package org.conscrypt
Interface SSLClientSessionCache
-
- All Known Implementing Classes:
FileClientSessionCache.Impl
@Internal public interface SSLClientSessionCache
A persistentSSLSession
cache used bySSLSessionContext
to share client-side SSL sessions across processes. For example, this cache enables applications to persist and reuse sessions across restarts.The
SSLSessionContext
implementation convertsSSLSession
s into raw bytes and vice versa. The exact makeup of the session data is dependent upon the caller's implementation and is opaque to theSSLClientSessionCache
implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getSessionData(java.lang.String host, int port)
Gets data from a pre-existing session for a given server host and port.void
putSessionData(javax.net.ssl.SSLSession session, byte[] sessionData)
Stores session data for the given session.
-
-
-
Method Detail
-
getSessionData
byte[] getSessionData(java.lang.String host, int port)
Gets data from a pre-existing session for a given server host and port.- Parameters:
host
- fromSSLSession.getPeerHost()
port
- fromSSLSession.getPeerPort()
- Returns:
- the session data or null if none is cached
- Throws:
java.lang.NullPointerException
- if host is null
-
putSessionData
void putSessionData(javax.net.ssl.SSLSession session, byte[] sessionData)
Stores session data for the given session.- Parameters:
session
- to cache data forsessionData
- to cache- Throws:
java.lang.NullPointerException
- if session, result ofsession.getPeerHost()
or data is null
-
-