Package com.io7m.idstore.server.internal

# Class IdUserSessionService

java.lang.Object
com.io7m.idstore.server.internal.IdUserSessionService

All Implemented Interfaces:
  `IdServiceType`, `jakarta.servlet.http.HttpSessionListener`, `EventListener`

public final class IdUserSessionService extends Object implements IdServiceType, jakarta.servlet.http.HttpSessionListener
A service to create and manage user controllers.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdUserSessionService()`
  A service to create and manage user controllers.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `IdUserSession`
  `createOrGet(UUID userId, String sessionId)`
  Create or get an existing user controller.
  `void`
  `delete(UUID userId, String sessionId)`
  Delete a user controller if one exists.
  `String`
  `description()`
  `void`
  `sessionCreated(jakarta.servlet.http.HttpSessionEvent se)`
  `void`
  `sessionDestroyed(jakarta.servlet.http.HttpSessionEvent se)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### IdUserSessionService

    public IdUserSessionService()
    A service to create and manage user controllers.

- ## Method Details

  - ### description

    public String description()
    Specified by:
      `description` in interface `IdServiceType`
    Returns:
      The service description

  - ### createOrGet

    public IdUserSession createOrGet(UUID userId, String sessionId)
    Create or get an existing user controller.
    Parameters:
      `userId` - The user ID
      `sessionId` - The session ID
    Returns:
      A user controller

  - ### sessionCreated

    public void sessionCreated(jakarta.servlet.http.HttpSessionEvent se)
    Specified by:
      `sessionCreated` in interface `jakarta.servlet.http.HttpSessionListener`

  - ### sessionDestroyed

    public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent se)
    Specified by:
      `sessionDestroyed` in interface `jakarta.servlet.http.HttpSessionListener`

  - ### delete

    public void delete(UUID userId, String sessionId)
    Delete a user controller if one exists.
    Parameters:
      `userId` - The user ID
      `sessionId` - The session ID

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`