Package com.io7m.idstore.server.service.sessions

# Class IdSessionUser

java.lang.Object
com.io7m.idstore.server.service.sessions.IdSessionUser

All Implemented Interfaces:
  `IdSessionType`

public final class IdSessionUser extends Object implements IdSessionType
A controller for a single user session.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdSessionUser(UUID inUserId, IdSessionSecretIdentifier inSessionId)`
  A controller for a single user session.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `IdSessionSecretIdentifier`
  `id()`
  `Optional<IdSessionMessage>`
  `messageCurrent()`
  `void`
  `messageCurrentSet(IdSessionMessage inMessage)`
  Set the current session message.
  `void`
  `messageDiscard()`
  Discard the current message.
  `String`
  `toString()`
  `UUID`
  `userId()`

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

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

- ## Constructor Details

  - ### IdSessionUser

    public IdSessionUser(UUID inUserId, IdSessionSecretIdentifier inSessionId)
    A controller for a single user session.
    Parameters:
      `inUserId` - The user ID
      `inSessionId` - The session ID

- ## Method Details

  - ### messageCurrentSet

    public void messageCurrentSet(IdSessionMessage inMessage)
    Set the current session message.
    Parameters:
      `inMessage` - The message

  - ### messageCurrent

    public Optional<IdSessionMessage> messageCurrent()
    Returns:
      The current session message

  - ### messageDiscard

    public void messageDiscard()
    Discard the current message.

  - ### id

    public IdSessionSecretIdentifier id()
    Specified by:
      `id` in interface `IdSessionType`
    Returns:
      The unique identifier for the session

  - ### userId

    public UUID userId()
    Returns:
      The user ID

  - ### toString

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