Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
Added in API level 1
public interface

SSLSessionContext

javax.net.ssl.SSLSessionContext

Class Overview

A collection of SSLSession s.

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

public abstract Enumeration <byte[]> getIds ()

Added in API level 1

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

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

public abstract SSLSession getSession (byte[] sessionId)

Added in API level 1

Returns the session for the specified session identifier.

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

public abstract int getSessionCacheSize ()

Added in API level 1

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

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

public abstract int getSessionTimeout ()

Added in API level 1

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

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

public abstract void setSessionCacheSize (int size)

Added in API level 1

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

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

public abstract void setSessionTimeout (int seconds)

Added in API level 1

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

Parameters
seconds the timeout in seconds, or zero if unlimited.
Throws
IllegalArgumentException if seconds is negative.