Skip to content

Most visited

Recently visited

navigation
Added in API level 1

SSLSessionContext

public interface SSLSessionContext

javax.net.ssl.SSLSessionContext


A collection of SSLSessions.

Summary

Public methods

abstract Enumeration<byte[]> getIds()

Returns an iterable of all session identifiers in this session context.

abstract SSLSession getSession(byte[] sessionId)

Returns the session for the specified session identifier.

abstract int getSessionCacheSize()

Returns the size of the session cache for this session context.

abstract int getSessionTimeout()

Returns the timeout for sessions in this session context.

abstract void setSessionCacheSize(int size)

Sets the size of the session cache for this session context.

abstract void setSessionTimeout(int seconds)

Sets the timeout for sessions in this context.

Public methods

getIds

Added in API level 1
Enumeration<byte[]> getIds ()

Returns an iterable of all session identifiers in this session context.

Returns
Enumeration<byte[]> an iterable of all session identifiers in this session context.

getSession

Added in API level 1
SSLSession getSession (byte[] sessionId)

Returns the session for the specified session identifier.

Parameters
sessionId byte: the session identifier of the session to look up.
Returns
SSLSession the session for the specified session identifier, or null if the specified session identifier does not refer to a session in this context.

getSessionCacheSize

Added in API level 1
int getSessionCacheSize ()

Returns the size of the session cache for this session context.

Returns
int the size of the session cache for this session context, or zero if unlimited.

getSessionTimeout

Added in API level 1
int getSessionTimeout ()

Returns the timeout for sessions in this session context. Sessions exceeding the timeout are invalidated.

Returns
int the timeout in seconds, or zero if unlimited.

setSessionCacheSize

Added in API level 1
void setSessionCacheSize (int size)

Sets the size of the session cache for this session context.

Parameters
size int: the size of the session cache, or zero for unlimited cache size.
Throws
IllegalArgumentException if size is negative.

setSessionTimeout

Added in API level 1
void setSessionTimeout (int seconds)

Sets the timeout for sessions in this context. Sessions exceeding the timeout are invalidated.

Parameters
seconds int: the timeout in seconds, or zero if unlimited.
Throws
IllegalArgumentException if seconds is negative.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.