SSLSessionContext


SSLSessionContext javax.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( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net