Package net.shibboleth.idp.admin.impl
Class InstallableComponentGaugeSet
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.admin.impl.InstallableComponentGaugeSet
- All Implemented Interfaces:
com.codahale.metrics.Metric,com.codahale.metrics.MetricFilter,com.codahale.metrics.MetricSet,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class InstallableComponentGaugeSet
extends AbstractIdentifiableInitializableComponent
implements com.codahale.metrics.MetricSet, com.codahale.metrics.MetricFilter
Guage set to report the Plugins' and IdP's installation and update statuses.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordTracks information about an installed component. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringDefault prefix for metrics.The map of gauges.private org.apache.hc.client5.http.classic.HttpClientHow to reach out.Where to look for update information.private InstallableComponentVersionIdP Version to check.private final org.slf4j.LoggerLogger.private HttpClientSecurityParametersany security parameters needed.Fields inherited from interface com.codahale.metrics.MetricFilter
ALL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidReturn information about the Installation update state of the IdP.(package private) InstallableComponentVersionNull safe IdP Version.Get list of installed plugins and their details.private Map<String,InstallableComponentVersion> Return the list of installed components and their versions.private PropertieslookupIdPProperties(@NotNull IdPPlugin plugin, Map<URL, Properties> pluginInfoCache) Look in the cache for the URL and return the properties if it's there, otherwise reach out to the URL and load the properties.booleanvoidsetHttpClient(org.apache.hc.client5.http.classic.HttpClient client) Set theHttpClientto use.voidsetIdpUpdateUrls(List<URL> urls) Set where to look for idp update info.voidSet anyHttpClientSecurityParameters.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
DEFAULT_METRIC_NAME
Default prefix for metrics.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
gauges
The map of gauges. -
idpUpdateUrls
Where to look for update information. -
httpClient
How to reach out. -
securityParams
any security parameters needed. -
idpVersion
IdP Version to check.
-
-
Constructor Details
-
InstallableComponentGaugeSet
public InstallableComponentGaugeSet()Constructor.
-
-
Method Details
-
setIdpUpdateUrls
Set where to look for idp update info.- Parameters:
urls- what to set.
-
setSecurityParams
Set anyHttpClientSecurityParameters.- Parameters:
params- what to set.
-
setHttpClient
public void setHttpClient(@Nonnull org.apache.hc.client5.http.classic.HttpClient client) Set theHttpClientto use.- Parameters:
client- what to set.
-
getIdPVersion
Null safe IdP Version.- Returns:
- the IdP version
-
getPluginList
Return the list of installed components and their versions.- Returns:
- map where the key is the PluginId and the value is the version
-
getPluginDetails
@Nonnull @NotLive @Unmodifiable private Map<String,InstallableComponentGaugeSet.InstallableComponentDetails> getPluginDetails()Get list of installed plugins and their details.- Returns:
- installed plugins and details
-
lookupIdPProperties
@Nullable private Properties lookupIdPProperties(@NotNull @NotNull IdPPlugin plugin, @NullableElements Map<URL, Properties> pluginInfoCache) Look in the cache for the URL and return the properties if it's there, otherwise reach out to the URL and load the properties.- Parameters:
plugin- theIdPPluginto considerpluginInfoCache- the cache of already looked up info, also serves as a negative cache- Returns:
- IdP update properties
-
getIdPDetails
Return information about the Installation update state of the IdP. -
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
getMetrics
- Specified by:
getMetricsin interfacecom.codahale.metrics.MetricSet
-
matches
- Specified by:
matchesin interfacecom.codahale.metrics.MetricFilter
-