Class FunctionDrivenDynamicHTTPMetadataResolver
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver
org.opensaml.saml.metadata.resolver.impl.AbstractDynamicHTTPMetadataResolver
org.opensaml.saml.metadata.resolver.impl.FunctionDrivenDynamicHTTPMetadataResolver
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<EntityDescriptor,,CriteriaSet> ClearableMetadataResolver,DynamicMetadataResolver,MetadataResolver,RemoteMetadataResolver
public class FunctionDrivenDynamicHTTPMetadataResolver
extends AbstractDynamicHTTPMetadataResolver
implements RemoteMetadataResolver
Simple implementation of an HTTP-based dynamic metadata resolver which builds the request URL
to process based on a
Function instance.
The function defaults to an instance of HTTPEntityIDRequestURLBuilder, thereby implementing
the "well-known location" resolution mechanism defined in the SAML 2 metadata specification if the entity ID
is an HTTP or HTTPS URL.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicHTTPMetadataResolver
AbstractDynamicHTTPMetadataResolver.BasicMetadataResponseHandlerNested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver
AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper, AbstractDynamicMetadataResolver.DefaultCacheKeyGenerator, AbstractDynamicMetadataResolver.DynamicEntityBackingStore, AbstractDynamicMetadataResolver.EntityManagementData, AbstractDynamicMetadataResolver.PersistentCacheInitializationMetricsNested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
AbstractMetadataResolver.EntityBackingStore -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerLogger.private Function<CriteriaSet,String> Function for building the request URL.Fields inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicHTTPMetadataResolver
DEFAULT_CONTENT_TYPES, MDC_ATTRIB_CURRENT_REQUEST_URIFields inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver
METRIC_GAUGE_NUM_LIVE_ENTITYIDS, METRIC_GAUGE_PERSISTENT_CACHE_INIT, METRIC_RATIOGAUGE_FETCH_TO_RESOLVE, METRIC_TIMER_FETCH_FROM_ORIGIN_SOURCE, METRIC_TIMER_RESOLVE -
Constructor Summary
ConstructorsConstructorDescriptionFunctionDrivenDynamicHTTPMetadataResolver(Timer backgroundTaskTimer, org.apache.hc.client5.http.classic.HttpClient client) Constructor.FunctionDrivenDynamicHTTPMetadataResolver(org.apache.hc.client5.http.classic.HttpClient client) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildRequestURL(CriteriaSet criteria) Build the request URL based on the input criteria set.Gets the URI from which this resolver is obtaining metadata.Get the function which builds the request URL.voidsetRequestURLBuilder(Function<CriteriaSet, String> builder) Set the function which builds the request URL.Methods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicHTTPMetadataResolver
buildHttpClientContext, buildHttpRequest, doDestroy, fetchFromOriginSource, getHttpClientSecurityParameters, getSupportedContentTypes, getSupportedMediaTypes, initMetadataResolver, setHttpClientSecurityParameters, setSupportedContentTypesMethods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver
clear, clear, computeExpirationTime, computeRefreshTriggerTime, createNewBackingStore, doResolve, ensureBackingStore, ensurePersistentCacheManager, getBackgroundInitializationFromCacheDelay, getBackingStore, getCleanupTaskInterval, getExpirationWarningThreshold, getIndexes, getInitializationFromCachePredicate, getMaxCacheDuration, getMaxIdleEntityData, getMinCacheDuration, getNegativeLookupCacheDuration, getPersistentCacheKeyGenerator, getPersistentCacheManager, getRefreshDelayFactor, indexEntityDescriptor, indexesEnabled, initializeFromPersistentCache, isInitializeFromPersistentCacheInBackground, isPersistentCachingEnabled, isRemoveIdleEntityData, lookupCriteria, lookupEntityID, prepareForFiltering, preProcessEntityDescriptor, processNewMetadata, processNewMetadata, processNonEntityIDFetchedEntittiesDescriptor, processNonEntityIDFetchedEntityDescriptor, processPersistentCacheEntry, removeByEntityID, resolveEntityID, resolveEntityIDs, resolveFromOriginSource, resolveFromOriginSourceWithEntityID, resolveFromOriginSourceWithoutEntityID, setBackgroundInitializationFromCacheDelay, setCleanupTaskInterval, setExpirationWarningThreshold, setIndexes, setInitializationFromCachePredicate, setInitializeFromPersistentCacheInBackground, setMaxCacheDuration, setMaxIdleEntityData, setMinCacheDuration, setNegativeLookupCacheDuration, setPersistentCacheKeyGenerator, setPersistentCacheManager, setRefreshDelayFactor, setRemoveIdleEntityData, shouldAttemptRefreshMethods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
doInitialize, filterMetadata, getActivationCondition, getCriterionPredicateRegistry, getLogPrefix, getMetadataFilter, getMetricsBaseName, getParserPool, getType, getUnmarshallerFactory, isFailFastInitialization, isRequireValidMetadata, isSatisfyAnyPredicates, isUseDefaultPredicateRegistry, isValid, lookupIndexedEntityID, newFilterContext, predicateFilterCandidates, preProcessEntitiesDescriptor, releaseMetadataDOM, resolve, resolveSingle, setActivationCondition, setBackingStore, setCriterionPredicateRegistry, setFailFastInitialization, setMetadataFilter, setMetricsBaseName, setParserPool, setRequireValidMetadata, setSatisfyAnyPredicates, setType, setUseDefaultPredicateRegistry, unmarshallMetadataMethods 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, 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
getIdMethods inherited from interface org.opensaml.saml.metadata.resolver.MetadataResolver
getMetadataFilter, getType, isRequireValidMetadata, setMetadataFilter, setRequireValidMetadataMethods inherited from interface net.shibboleth.shared.resolver.Resolver
resolve, resolveSingle
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
requestURLBuilder
Function for building the request URL.
-
-
Constructor Details
-
FunctionDrivenDynamicHTTPMetadataResolver
public FunctionDrivenDynamicHTTPMetadataResolver(@Nonnull org.apache.hc.client5.http.classic.HttpClient client) Constructor.- Parameters:
client- the instance ofHttpClientused to fetch remote metadata
-
FunctionDrivenDynamicHTTPMetadataResolver
public FunctionDrivenDynamicHTTPMetadataResolver(@Nullable Timer backgroundTaskTimer, @Nonnull org.apache.hc.client5.http.classic.HttpClient client) Constructor.- Parameters:
backgroundTaskTimer- theTimerinstance used to run resolver background managment tasksclient- the instance ofHttpClientused to fetch remote metadata
-
-
Method Details
-
getRequestURLBuilder
Get the function which builds the request URL.Defaults to an instance of
HTTPEntityIDRequestURLBuilder.- Returns:
- the request URL builder function instance
-
setRequestURLBuilder
Set the function which builds the request URL.Defaults to an instance of
HTTPEntityIDRequestURLBuilder.- Parameters:
builder- the request URL builder function instance
-
getMetadataURI
Gets the URI from which this resolver is obtaining metadata.- Specified by:
getMetadataURIin interfaceRemoteMetadataResolver- Returns:
- URL source of metadata
-