Package org.opends.server.protocols.http
Class HttpStatistics
java.lang.Object
org.opends.server.protocols.http.HttpStatistics
Collects statistics for HTTP.
-
Field Summary
Modifier and TypeFieldDescriptionHTTP methods supported by Rest2Ldap. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the number of HTTP requests of any kind that have been processed.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.
-
Field Details
-
SUPPORTED_HTTP_METHODS
HTTP methods supported by Rest2Ldap.
-
-
Constructor Details
-
HttpStatistics
public HttpStatistics()
-
-
Method Details
-
getRequestCount
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.
-