Class HttpStatistics

java.lang.Object
org.opends.server.protocols.http.HttpStatistics

public final class HttpStatistics extends Object
Collects statistics for HTTP.
  • Field Details

    • SUPPORTED_HTTP_METHODS

      public static final List<String> SUPPORTED_HTTP_METHODS
      HTTP methods supported by Rest2Ldap.
  • Constructor Details

    • HttpStatistics

      public HttpStatistics()
  • Method Details

    • getRequestCount

      public Long getRequestCount(String httpMethod)
      Returns the number of HTTP requests of the provided HTTP method that have been processed.
      Parameters:
      httpMethod - A String representing the http method name. Available methods are (case insensitive) "delete", "get", "patch", "post" and "put".
      Returns:
      The number of HTTP requests for the provided HTTP methods that have been processed, or null if the httpMethod is not part of the method listed above.
    • getAllRequestsCount

      public long getAllRequestsCount()
      Returns the number of HTTP requests of any kind that have been processed.
      Returns:
      The number of HTTP requests of any kind that have been processed.
    • updateBytesRead

      public void updateBytesRead(long bytes)
      Updates the counter for the number of bytes that have been read from the network.
      Parameters:
      bytes - The number of bytes read from the network.
    • updateBytesWritten

      public void updateBytesWritten(long bytes)
      Updates the counter for the number of bytes that have been written to the network.
      Parameters:
      bytes - The number of bytes written to the network.