public class ClientSessionContext extends Object
| Constructor and Description |
|---|
ClientSessionContext() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
Enumeration<byte[]> |
getIds() |
SSLSession |
getSession(byte[] sessionId) |
SSLSession |
getSession(String host,
int port)
Finds a cached session for the given host name and port.
|
int |
getSessionCacheSize() |
int |
getSessionTimeout() |
void |
putSession(SSLSession session) |
protected void |
sessionRemoved(SSLSession session)
Called when a session is removed.
|
void |
setPersistentCache(SSLClientSessionCache persistentCache) |
void |
setSessionCacheSize(int size) |
void |
setSessionTimeout(int seconds) |
int |
size() |
byte[] |
toBytes(SSLSession session)
Converts the given session to bytes.
|
OpenSSLSessionImpl |
toSession(byte[] data,
String host,
int port)
Creates a session from the given bytes.
|
protected void |
trimToSize()
Makes sure cache size is < maximumSize.
|
protected SSLSession |
wrapSSLSessionIfNeeded(SSLSession session) |
public int size()
public void setPersistentCache(SSLClientSessionCache persistentCache)
protected void sessionRemoved(SSLSession session)
public SSLSession getSession(String host, int port)
host - of serverport - of serverpublic void putSession(SSLSession session)
public final Enumeration<byte[]> getIds()
getIds in interface SSLSessionContextpublic final int getSessionCacheSize()
getSessionCacheSize in interface SSLSessionContextpublic final int getSessionTimeout()
getSessionTimeout in interface SSLSessionContextprotected void trimToSize()
public void setSessionTimeout(int seconds)
throws IllegalArgumentException
setSessionTimeout in interface SSLSessionContextIllegalArgumentExceptionpublic final void setSessionCacheSize(int size)
throws IllegalArgumentException
setSessionCacheSize in interface SSLSessionContextIllegalArgumentExceptionpublic byte[] toBytes(SSLSession session)
public OpenSSLSessionImpl toSession(byte[] data, String host, int port)
protected SSLSession wrapSSLSessionIfNeeded(SSLSession session)
public SSLSession getSession(byte[] sessionId)
getSession in interface SSLSessionContext