Team LiB
Previous Section Next Section

SSLSessionContextjavax.net.ssl

Java 1.4

A SSLSessionContext groups and controls SSLSession objects. It is a low-level interface and is not commonly used in application code. getIds( ) returns an Enumeration of session IDs, and getSession( ) returns the SSLSession object associated with one of those IDs. setSessionCacheSize( ) specifies the total number of concurrent sessions allowed in the group, and setSessionTimeout( ) specifies the timeout length for those sessions. An SSLSessionContext can serve as a cache for SSLSession objects, facilitating reuse of those objects for multiple connections between the same two hosts.

Providers are not required to support this interface. Those that do return an implementing object from the getSessionContext( ) method of an SSLSession object, and also return implementing objects from the getClientSessionContext( ) and getServerSessionContext( ) methods of an SSLContext object, providing separate control over client and server SSL connections.

public interface SSLSessionContext {
// Public Instance Methods
     java.util.Enumeration getIds( );  
     SSLSession getSession(byte[ ] sessionId);  
     int getSessionCacheSize( );  
     int getSessionTimeout( );  
     void setSessionCacheSize(int size) throws IllegalArgumentException;  
     void setSessionTimeout(int seconds) throws IllegalArgumentException;  
}

Returned By

SSLContext.{getClientSessionContext( ), getServerSessionContext( )}, SSLContextSpi.{engineGetClientSessionContext( ), engineGetServerSessionContext( )}, SSLSession.getSessionContext( )

    Team LiB
    Previous Section Next Section