Package org.opends.server.protocols.http
Class HttpStatistics
- java.lang.Object
-
- org.opends.server.protocols.http.HttpStatistics
-
public final class HttpStatistics extends Object
Collects statistics for HTTP.
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>
SUPPORTED_HTTP_METHODS
HTTP methods supported by Rest2Ldap.
-
Constructor Summary
Constructors Constructor Description HttpStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAllRequestsCount()
Returns the number of HTTP requests of any kind that have been processed.Long
getRequestCount(String httpMethod)
Returns the number of HTTP requests of the provided HTTP method that have been processed.void
updateBytesRead(long bytes)
Updates the counter for the number of bytes that have been read from the network.void
updateBytesWritten(long bytes)
Updates the counter for the number of bytes that have been written to the network.
-
-
-
Method Detail
-
getRequestCount
public Long getRequestCount(String httpMethod)
Returns the number of HTTP requests of the provided HTTP method that have been processed.- Parameters:
httpMethod
- AString
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.
-
-