Package com.io7m.idstore.server.http

# Class IdRequestUniqueIDs

java.lang.Object
com.io7m.idstore.server.http.IdRequestUniqueIDs

All Implemented Interfaces:
  `EventListener`, `org.eclipse.jetty.server.HttpChannel.Listener`

public final class IdRequestUniqueIDs extends Object implements org.eclipse.jetty.server.HttpChannel.Listener
A request listener that appends a probably-unique ID to every request.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdRequestUniqueIDs(com.io7m.repetoir.core.RPServiceDirectoryType services)`
  A request listener that appends a probably-unique ID to every request.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onRequestBegin(org.eclipse.jetty.server.Request request)`
  `static UUID`
  `requestIdFor(jakarta.servlet.http.HttpServletRequest request)`
  Get the unique ID for the given request.
  `static String`
  `uniqueRequestIDKey()`
  `static String`
  `uniqueRequestTimeKey()`

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

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

  ### Methods inherited from interface org.eclipse.jetty.server.HttpChannel.Listener

  `onAfterDispatch, onBeforeDispatch, onComplete, onDispatchFailure, onRequestContent, onRequestContentEnd, onRequestEnd, onRequestFailure, onRequestTrailers, onResponseBegin, onResponseCommit, onResponseContent, onResponseEnd, onResponseFailure`

- ## Constructor Details

  - ### IdRequestUniqueIDs

    public IdRequestUniqueIDs(com.io7m.repetoir.core.RPServiceDirectoryType services)
    A request listener that appends a probably-unique ID to every request.
    Parameters:
      `services` - A service directory

- ## Method Details

  - ### uniqueRequestIDKey

    public static String uniqueRequestIDKey()
    Returns:
      The attribute name used to hold a unique ID

  - ### uniqueRequestTimeKey

    public static String uniqueRequestTimeKey()
    Returns:
      The attribute name used to hold a start time

  - ### requestIdFor

    public static UUID requestIdFor(jakarta.servlet.http.HttpServletRequest request)
    Get the unique ID for the given request.
    Parameters:
      `request` - The request
    Returns:
      The unique ID

  - ### onRequestBegin

    public void onRequestBegin(org.eclipse.jetty.server.Request request)
    Specified by:
      `onRequestBegin` in interface `org.eclipse.jetty.server.HttpChannel.Listener`