Class OpenSearchMockAPIBasedRepositoryIntegTestCase.HttpStatsCollectorHandler
java.lang.Object
org.opensearch.repositories.blobstore.OpenSearchMockAPIBasedRepositoryIntegTestCase.HttpStatsCollectorHandler
- All Implemented Interfaces:
HttpHandler,OpenSearchMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler
- Enclosing class:
OpenSearchMockAPIBasedRepositoryIntegTestCase
public abstract static class OpenSearchMockAPIBasedRepositoryIntegTestCase.HttpStatsCollectorHandler
extends Object
implements OpenSearchMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler
HTTP handler that allows collect request stats per request type.
Implementors should keep track of the desired requests on maybeTrack(String, Headers).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(HttpExchange exchange) protected abstract voidmaybeTrack(String request, Headers requestHeaders) Tracks the given request if it matches the criteria.protected voidtrackRequest(String requestType)
-
Constructor Details
-
HttpStatsCollectorHandler
-
-
Method Details
-
getDelegate
- Specified by:
getDelegatein interfaceOpenSearchMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler
-
trackRequest
-
handle
- Specified by:
handlein interfaceHttpHandler- Throws:
IOException
-
maybeTrack
Tracks the given request if it matches the criteria.The request is represented as: Request = Method SP Request-URI
- Parameters:
request- the request to be tracked if it matches the criteriarequestHeaders- the http request headers
-