public final class SSLSessionCache extends Object
SSLCertificateSocketFactory
Constructor and Description |
---|
SSLSessionCache(Context context)
Create a session cache at the default location for this app.
|
SSLSessionCache(File dir)
Create a session cache using the specified directory.
|
SSLSessionCache(Object cache)
NOTE: This needs to be Object (and not SSLClientSessionCache) because apps
that build directly against the framework (and not the SDK) might not declare
a dependency on conscrypt.
|
Modifier and Type | Method and Description |
---|---|
static void |
install(SSLSessionCache cache,
SSLContext context)
Installs a
SSLSessionCache on a SSLContext . |
public SSLSessionCache(Object cache)
public SSLSessionCache(File dir) throws IOException
dir
- to store session files in (created if necessary)IOException
- if the cache can't be openedpublic SSLSessionCache(Context context)
context
- for the applicationpublic static void install(SSLSessionCache cache, SSLContext context)
SSLSessionCache
on a SSLContext
. The cache will
be used on all socket factories created by this context (including factories
created before this call).cache
- the cache instance to install, or null
to uninstall any
existing cache.context
- the context to install it on.IllegalArgumentException
- if the context does not support a session
cache.