Package org.forgerock.monitoring
Class DropwizardMetricsCollectionResourceProvider
- java.lang.Object
-
- org.forgerock.monitoring.DropwizardMetricsCollectionResourceProvider
-
- All Implemented Interfaces:
CollectionResourceProvider
public class DropwizardMetricsCollectionResourceProvider extends Object implements CollectionResourceProvider
A CREST CollectionResourceProvider that adds queryFilter, field filtering, sorting abilities, and paging to the dropwizard json metrics data. Note that only offset-based paging is supported.
-
-
Constructor Summary
Constructors Constructor Description DropwizardMetricsCollectionResourceProvider(Supplier<org.forgerock.monitoring.api.instrument.MeterRegistry> meterRegistrySupplier)Constructs the resource provider for the passed in Dropwizard metric set supplier.DropwizardMetricsCollectionResourceProvider(org.forgerock.monitoring.api.instrument.MeterRegistry meterRegistry)Constructs the resource provider for the passed in Dropwizard metric set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Promise<QueryResponse,ResourceException>queryCollection(Context context, QueryRequest request, QueryResourceHandler handler)Searchesthe collection for all resources which match the query request criteria.Promise<ResourceResponse,ResourceException>readInstance(Context context, String resourceId, ReadRequest request)Readsan existing resource within the collection.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.forgerock.json.resource.CollectionResourceProvider
actionCollection, actionInstance, createInstance, deleteInstance, patchInstance, updateInstance
-
-
-
-
Constructor Detail
-
DropwizardMetricsCollectionResourceProvider
public DropwizardMetricsCollectionResourceProvider(org.forgerock.monitoring.api.instrument.MeterRegistry meterRegistry)
Constructs the resource provider for the passed in Dropwizard metric set.- Parameters:
meterRegistry- The DropwizardMetricSetfrom which to provide metrics.
-
DropwizardMetricsCollectionResourceProvider
public DropwizardMetricsCollectionResourceProvider(Supplier<org.forgerock.monitoring.api.instrument.MeterRegistry> meterRegistrySupplier)
Constructs the resource provider for the passed in Dropwizard metric set supplier.- Parameters:
meterRegistrySupplier-Supplierof the DropwizardMetricSetfrom which to provide metrics.
-
-
Method Detail
-
queryCollection
public Promise<QueryResponse,ResourceException> queryCollection(Context context, QueryRequest request, QueryResourceHandler handler)
Description copied from interface:CollectionResourceProviderSearchesthe collection for all resources which match the query request criteria.Implementations must invoke
QueryResourceHandler.handleResource(ResourceResponse)for each resource which matches the query criteria. Once all matching resources have been returned implementations are required to return either aQueryResponseif the query has completed successfully, orResourceExceptionif the query did not complete successfully (even if some matching resources were returned).- Specified by:
queryCollectionin interfaceCollectionResourceProvider- Parameters:
context- The request server context.request- The query request.handler- The query resource handler to be notified for each matching resource.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
RequestHandler.handleQuery(Context, QueryRequest, QueryResourceHandler)
-
readInstance
public Promise<ResourceResponse,ResourceException> readInstance(Context context, String resourceId, ReadRequest request)
Description copied from interface:CollectionResourceProviderReadsan existing resource within the collection.- Specified by:
readInstancein interfaceCollectionResourceProvider- Parameters:
context- The request server context.resourceId- The ID of the targeted resource within the collection.request- The read request.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
RequestHandler.handleRead(Context, ReadRequest)
-
-