Interface UserSessions<D,S>

Type Parameters:
D - deployment identifier type
S - session identifier type

public interface UserSessions<D,S>
Represents an index of user sessions.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addSession(D deployment, S session)
    Adds the specified deployment and session identifiers to the set of deployments for which the associated user is authenticated.
    Returns the set of deployments for which the associated user is authenticated.
    getSession(D deployment)
    Returns the corresponding session identifier for the specified deployment.
    removeSession(D deployment)
    Removes the specified deployment from the set of deployments for which the associated user is authenticated.
  • Method Details

    • getDeployments

      Set<D> getDeployments()
      Returns the set of deployments for which the associated user is authenticated.
      Returns:
      a set of deployment identifiers.
    • getSession

      S getSession(D deployment)
      Returns the corresponding session identifier for the specified deployment.
      Parameters:
      deployment - a deployment identifier
      Returns:
      the session identifier of the user for the specified deployment, or null, if no session exists for the associated user.
    • removeSession

      S removeSession(D deployment)
      Removes the specified deployment from the set of deployments for which the associated user is authenticated.
      Parameters:
      deployment - a deployment identifier
      Returns:
      the session identifier of the user for the specified deployment, or null, if no session exists for the associated user.
    • addSession

      boolean addSession(D deployment, S session)
      Adds the specified deployment and session identifiers to the set of deployments for which the associated user is authenticated.
      Parameters:
      deployment - a deployment identifier
      session - a session identifier
      Returns:
      true, if the session was added, false it already exists