Package org.conscrypt

Interface SSLServerSessionCache


  • interface SSLServerSessionCache
    A persistent SSLSession cache used by SSLSessionContext to share server-side SSL sessions across processes. For example, this cache enables one server to resume a session started by a different server based on a session ID provided by the client.

    The SSLSessionContext implementation converts SSLSessions into raw bytes and vice versa. The exact makeup of the session data is dependent upon the caller's implementation and is opaque to the SSLServerSessionCache implementation.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] getSessionData​(byte[] id)
      Gets the session data for given session ID.
      void putSessionData​(javax.net.ssl.SSLSession session, byte[] sessionData)
      Stores session data for the given session.
    • Method Detail

      • getSessionData

        byte[] getSessionData​(byte[] id)
        Gets the session data for given session ID.
        Parameters:
        id - from SSLSession.getId()
        Returns:
        the session data or null if none is cached
        Throws:
        java.lang.NullPointerException - if id is null
      • putSessionData

        void putSessionData​(javax.net.ssl.SSLSession session,
                            byte[] sessionData)
        Stores session data for the given session.
        Parameters:
        session - to cache data for
        sessionData - to cache
        Throws:
        java.lang.NullPointerException - if session or data is null