Package net.shibboleth.idp.saml.metadata.impl

# Class MetadataResolverServiceGaugeSet

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.service.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

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.

### Fields inherited from interface com.codahale.metrics.MetricFilter

`ALL`

## Constructor Summary

Constructors
Constructor
Description
`MetadataResolverServiceGaugeSet(String metricName)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`private String`
`extractErrorMessage(Throwable t)`
Extract the error message to report out.
`private List<MetadataResolver>`
`getAllChildren(ChainingMetadataResolver parent)`
Get all the resolvers rooted in the provider tree (including the root).
`private Iterable<MetadataResolver>`
`getMetadataResolvers(MetadataResolver rootResolver)`
Return the resolvers to report on.
`private <T> Map<String,T>`
`valueGetter(BiConsumer<ImmutableMap.Builder<String,T>,MetadataResolver> consume)`
Helper Function for map construction.

### Methods inherited from class net.shibboleth.shared.service.ReloadableServiceGaugeSet

`getLogPrefix, getMetricMap, getMetrics, getService, matches, setService`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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 log
Class 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

@Nonnull private String extractErrorMessage(Throwable t)
Extract the error message to report out.

Parameters:
  `t` - the throwable to process
Returns:
  the error message string to report out

### valueGetter

@Nonnull private <T> Map<String,T> valueGetter(@Nonnull 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

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `ReloadableServiceGaugeSet<MetadataResolver>`
Throws:
  `ComponentInitializationException`

### getAllChildren

@Nonnull @Unmodifiable @NotLive private List<MetadataResolver> getAllChildren(@Nonnull ChainingMetadataResolver parent)
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 @Unmodifiable @NotLive private Iterable<MetadataResolver> getMetadataResolvers(@Nonnull MetadataResolver rootResolver)
Return the resolvers to report on.

Parameters:
  `rootResolver` - root component
Returns:
  resolvers to report on