public class DropwizardMetricsCollectionResourceProvider extends Object implements CollectionResourceProvider
Constructor and Description |
---|
DropwizardMetricsCollectionResourceProvider(MeterRegistry meterRegistry)
Constructs the resource provider for the passed in Dropwizard metric set.
|
DropwizardMetricsCollectionResourceProvider(Supplier<MeterRegistry> meterRegistrySupplier)
Constructs the resource provider for the passed in Dropwizard metric set supplier.
|
Modifier and Type | Method and Description |
---|---|
Promise<QueryResponse,ResourceException> |
queryCollection(org.forgerock.services.context.Context context,
QueryRequest request,
QueryResourceHandler handler)
Searches the collection for all resources which match the query request
criteria. |
Promise<ResourceResponse,ResourceException> |
readInstance(org.forgerock.services.context.Context context,
String resourceId,
ReadRequest request)
Reads an existing resource within the collection. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
actionCollection, actionInstance, createInstance, deleteInstance, patchInstance, updateInstance
public DropwizardMetricsCollectionResourceProvider(MeterRegistry meterRegistry)
meterRegistry
- The Dropwizard MetricSet
from which to provide metrics.public DropwizardMetricsCollectionResourceProvider(Supplier<MeterRegistry> meterRegistrySupplier)
meterRegistrySupplier
- Supplier
of the Dropwizard MetricSet
from which to provide metrics.public Promise<QueryResponse,ResourceException> queryCollection(org.forgerock.services.context.Context context, QueryRequest request, QueryResourceHandler handler)
CollectionResourceProvider
Searches
the 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 a
QueryResponse
if the query has completed successfully, or
ResourceException
if the query did not complete successfully
(even if some matching resources were returned).
queryCollection
in interface CollectionResourceProvider
context
- The request server context.request
- The query request.handler
- The query resource handler to be notified for each matching
resource.Promise
containing the result of the operation.RequestHandler.handleQuery(Context, QueryRequest, QueryResourceHandler)
public Promise<ResourceResponse,ResourceException> readInstance(org.forgerock.services.context.Context context, String resourceId, ReadRequest request)
CollectionResourceProvider
Reads
an existing resource within the collection.readInstance
in interface CollectionResourceProvider
context
- The request server context.resourceId
- The ID of the targeted resource within the collection.request
- The read request.Promise
containing the result of the operation.RequestHandler.handleRead(Context, ReadRequest)
Copyright 2010-2022 ForgeRock AS.