Class ESMockAPIBasedRepositoryIntegTestCase.HttpStatsCollectorHandler
java.lang.Object
org.elasticsearch.repositories.blobstore.ESMockAPIBasedRepositoryIntegTestCase.HttpStatsCollectorHandler
- All Implemented Interfaces:
HttpHandler,ESMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler
- Enclosing class:
ESMockAPIBasedRepositoryIntegTestCase
public abstract static class ESMockAPIBasedRepositoryIntegTestCase.HttpStatsCollectorHandler
extends Object
implements ESMockAPIBasedRepositoryIntegTestCase.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 interfaceESMockAPIBasedRepositoryIntegTestCase.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
-