Top Description Methods
org.conscrypt

public Interface SSLClientSessionCache

Known Direct Implementers
org.conscrypt.FileClientSessionCache.Impl
Annotations
@Internal
Imports
javax.net.ssl.SSLSession

A persistent javax.net.ssl.SSLSession cache used by javax.net.ssl.SSLSessionContext to share client-side SSL sessions across processes. For example, this cache enables applications to persist and reuse sessions across restarts.

The SSLSessionContext implementation converts SSLSessions into raw bytes and vice versa. The exact makeup of the session data is dependent upon the caller's implementation and is opaque to the SSLClientSessionCache implementation.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the session data or null if none is cached
getSessionData
(String host, int port)

Gets data from a pre-existing session for a given server host and port.

public void
putSessionData(SSLSession
to cache data for
session
,
byte[]
to cache
sessionData
)

Stores session data for the given session.

Method Detail

getSessionDataback to summary
public byte[] getSessionData(String host, int port)

Gets data from a pre-existing session for a given server host and port.

Parameters
host:String

from javax.net.ssl.SSLSession#getPeerHost()

port:int

from javax.net.ssl.SSLSession#getPeerPort()

Returns:byte[]

the session data or null if none is cached

Exceptions
NullPointerException:
if host is null
putSessionDataback to summary
public void putSessionData(SSLSession session, byte[] sessionData)

Stores session data for the given session.

Parameters
session:SSLSession

to cache data for

sessionData:byte[]

to cache

Exceptions
NullPointerException:
if session, result of session.getPeerHost() or data is null