Class MetadataResolverServiceGaugeSet
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.metrics.ReloadableServiceGaugeSet<MetadataResolver>
net.shibboleth.idp.saml.metadata.impl.MetadataResolverServiceGaugeSet
- All Implemented Interfaces:
com.codahale.metrics.Metric
,com.codahale.metrics.MetricFilter
,com.codahale.metrics.MetricSet
,Component
,DestructableComponent
,InitializableComponent
public class MetadataResolverServiceGaugeSet
extends ReloadableServiceGaugeSet<MetadataResolver>
implements com.codahale.metrics.MetricSet, com.codahale.metrics.MetricFilter
Additional gauges for metadata resolvers.
-
Field Summary
FieldsFields inherited from class net.shibboleth.idp.metrics.ReloadableServiceGaugeSet
DEFAULT_METRIC_NAME
Fields inherited from interface com.codahale.metrics.MetricFilter
ALL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
private String
Extract the error message to report out.private List<MetadataResolver>
Get all the resolvers rooted in the provider tree (including the root).private Iterable<MetadataResolver>
getMetadataResolvers
(MetadataResolver rootResolver) Return the resolvers to report on.valueGetter
(BiConsumer<ImmutableMap.Builder<String, T>, MetadataResolver> consume) Helper Function for map construction.Methods inherited from class net.shibboleth.idp.metrics.ReloadableServiceGaugeSet
getLogPrefix, getMetricMap, getMetrics, getService, matches, setService
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.codahale.metrics.MetricFilter
matches
Methods inherited from interface com.codahale.metrics.MetricSet
getMetrics
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
MetadataResolverServiceGaugeSet
public MetadataResolverServiceGaugeSet(@Nonnull @NotEmpty @ParameterName(name="metricName") String metricName) Constructor.- Parameters:
metricName
- name to include in metric names produced by this set
-
-
Method Details
-
extractErrorMessage
Extract the error message to report out.- Parameters:
t
- the throwable to process- Returns:
- the error message string to report out
-
valueGetter
private <T> Map<String,T> valueGetter(BiConsumer<ImmutableMap.Builder<String, T>, MetadataResolver> consume) Helper Function for map construction.This does all the service handling and just calls the specific
BiConsumer
to add each appropriate the value to the map.- Type Parameters:
T
- the type of value being reported out- Parameters:
consume
- the thing which does checking and adding the building- Returns:
- an appropriate map
-
doInitialize
- Overrides:
doInitialize
in classReloadableServiceGaugeSet<MetadataResolver>
- Throws:
ComponentInitializationException
-
getAllChildren
Get all the resolvers rooted in the provider tree (including the root).- Parameters:
parent
- - root of the chaining resolver tree.- Returns:
- - the list.
-
getMetadataResolvers
@Nonnull @NonnullElements private Iterable<MetadataResolver> getMetadataResolvers(@Nonnull MetadataResolver rootResolver) Return the resolvers to report on.- Parameters:
rootResolver
- root component- Returns:
- resolvers to report on
-