Class HttpLogContext

java.lang.Object
org.forgerock.services.context.AbstractContext
org.opends.server.protocols.http.HttpLogContext
All Implemented Interfaces:
org.forgerock.services.context.Context, HTTPRequestInfo

public final class HttpLogContext extends org.forgerock.services.context.AbstractContext implements HTTPRequestInfo
This context contains the logging informations related to the request processing.
  • Method Details

    • log

      public void log(int statusCode)
      Description copied from interface: HTTPRequestInfo
      Logs the current request info in the HTTP access log.
      Specified by:
      log in interface HTTPRequestInfo
      Parameters:
      statusCode - the HTTP status code that was returned to the client.
    • getAuthUser

      public String getAuthUser()
      Description copied from interface: HTTPRequestInfo
      Returns the username that was used to authenticate.
      Specified by:
      getAuthUser in interface HTTPRequestInfo
      Returns:
      the authUser
    • setAuthUser

      public void setAuthUser(String authUser)
      Description copied from interface: HTTPRequestInfo
      Sets the username that was used to authenticate.
      Specified by:
      setAuthUser in interface HTTPRequestInfo
      Parameters:
      authUser - the authUser to set
    • getStatusCode

      public int getStatusCode()
      Description copied from interface: HTTPRequestInfo
      Returns the HTTP status code returned to the client.
      Specified by:
      getStatusCode in interface HTTPRequestInfo
      Returns:
      the statusCode
    • getServerAddress

      public String getServerAddress()
      Description copied from interface: HTTPRequestInfo
      Returns the server's host.
      Specified by:
      getServerAddress in interface HTTPRequestInfo
      Returns:
      the serverAddress
    • getServerHost

      public String getServerHost()
      Description copied from interface: HTTPRequestInfo
      Returns the server's host.
      Specified by:
      getServerHost in interface HTTPRequestInfo
      Returns:
      the serverHost
    • getServerPort

      public int getServerPort()
      Description copied from interface: HTTPRequestInfo
      Returns the server's port.
      Specified by:
      getServerPort in interface HTTPRequestInfo
      Returns:
      the serverPort
    • getClientAddress

      public String getClientAddress()
      Description copied from interface: HTTPRequestInfo
      Returns the client's address.
      Specified by:
      getClientAddress in interface HTTPRequestInfo
      Returns:
      the clientAddress
    • getClientHost

      public String getClientHost()
      Description copied from interface: HTTPRequestInfo
      Returns the client's host.
      Specified by:
      getClientHost in interface HTTPRequestInfo
      Returns:
      the clientHost
    • getClientPort

      public int getClientPort()
      Description copied from interface: HTTPRequestInfo
      Returns the client's port.
      Specified by:
      getClientPort in interface HTTPRequestInfo
      Returns:
      the clientPort
    • getProtocol

      public String getProtocol()
      Description copied from interface: HTTPRequestInfo
      Returns the protocol used for this request.
      Specified by:
      getProtocol in interface HTTPRequestInfo
      Returns:
      the protocol
    • getMethod

      public String getMethod()
      Description copied from interface: HTTPRequestInfo
      Returns the HTTP method/verb used for this request.
      Specified by:
      getMethod in interface HTTPRequestInfo
      Returns:
      the method
    • getUri

      public URI getUri()
      Description copied from interface: HTTPRequestInfo
      Returns the URI issued by the client.
      Specified by:
      getUri in interface HTTPRequestInfo
      Returns:
      the URI
    • getUserAgent

      public String getUserAgent()
      Description copied from interface: HTTPRequestInfo
      Returns the user agent used by the client.
      Specified by:
      getUserAgent in interface HTTPRequestInfo
      Returns:
      the userAgent
    • getConnectionID

      public long getConnectionID()
      Description copied from interface: HTTPRequestInfo
      Returns the unique identifier that has been assigned to the client connection for this HTTP request.
      Specified by:
      getConnectionID in interface HTTPRequestInfo
      Returns:
      The unique identifier that has been assigned to the client connection for this HTTP request
    • getTotalProcessingTime

      public long getTotalProcessingTime()
      Description copied from interface: HTTPRequestInfo
      Returns the total processing time for this HTTP request.
      Specified by:
      getTotalProcessingTime in interface HTTPRequestInfo
      Returns:
      the total processing time for this HTTP request
    • getTransactionId

      public String getTransactionId()
      Description copied from interface: HTTPRequestInfo
      Returns the transactionId for this request.
      Specified by:
      getTransactionId in interface HTTPRequestInfo
      Returns:
      the transactionId