Interface ClientSessionStore

All Known Implementing Classes:
ClientSessionMemoryCache

public interface ClientSessionStore
Where a client keeps session tickets between connections, by server. Each ticket is handed out once (take(java.lang.String)), as RFC 8446 appendix C.4 recommends, so that connections cannot be linked by their tickets and a server may treat tickets as single-use.

Implementations must be thread-safe: the connections of a client share a store.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ClientSessionStore
    A store that keeps nothing, so every connection makes a full handshake.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    put(String key, SessionTicket ticket)
    Keeps a ticket.
    take(String key)
    Takes the newest ticket for a server, removing it.
  • Field Details

    • NONE

      static final ClientSessionStore NONE
      A store that keeps nothing, so every connection makes a full handshake.
  • Method Details

    • put

      void put(String key, SessionTicket ticket)
      Keeps a ticket.
      Parameters:
      key - the server it is for: its name, or another key the caller uses consistently
      ticket - the ticket
    • take

      SessionTicket take(String key)
      Takes the newest ticket for a server, removing it.
      Parameters:
      key - the server
      Returns:
      the ticket, or null if there is none