public class MetricsFeature extends Object implements javax.ws.rs.core.Feature
Feature
which registers a InstrumentedResourceMethodApplicationListener
for recording request events.Constructor and Description |
---|
MetricsFeature(MetricRegistry registry) |
MetricsFeature(String registryName) |
Modifier and Type | Method and Description |
---|---|
boolean |
configure(javax.ws.rs.core.FeatureContext context)
A call-back method called when the feature is to be enabled in a given
runtime configuration scope.
|
public MetricsFeature(MetricRegistry registry)
public MetricsFeature(String registryName)
public boolean configure(javax.ws.rs.core.FeatureContext context)
true
if the feature was successfully enabled or false
otherwise.
Note that under some circumstances the feature may decide not to enable itself, which
is indicated by returning false
. In such case the configuration context does
not add the feature to the collection of enabled features and a subsequent call to
Configuration.isEnabled(javax.ws.rs.core.Feature)
or
Configuration.isEnabled(Class)
method
would return false
.
configure
in interface javax.ws.rs.core.Feature
context
- configurable context in which the feature should be enabled.true
if the feature was successfully enabled, false
otherwise.Copyright © 2014. All Rights Reserved.