Class FunctionDrivenDynamicHTTPMetadataResolver
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.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
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.BasicMetadataResponseHandler
Nested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver
AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper, AbstractDynamicMetadataResolver.DefaultCacheKeyGenerator, AbstractDynamicMetadataResolver.DynamicEntityBackingStore, AbstractDynamicMetadataResolver.EntityManagementData, AbstractDynamicMetadataResolver.PersistentCacheInitializationMetrics
Nested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
AbstractMetadataResolver.EntityBackingStore
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Logger.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_URI
Fields 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.http.client.HttpClient client) Constructor.FunctionDrivenDynamicHTTPMetadataResolver
(org.apache.http.client.HttpClient client) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildRequestURL
(CriteriaSet criteria) Build the request URL based on the input criteria set.Get the function which builds the request URL.void
setRequestURLBuilder
(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, setSupportedContentTypes
Methods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver
clear, clear, computeExpirationTime, computeRefreshTriggerTime, createNewBackingStore, getBackgroundInitializationFromCacheDelay, getBackingStore, getCleanupTaskInterval, getExpirationWarningThreshold, getIndexes, getInitializationFromCachePredicate, getMaxCacheDuration, getMaxIdleEntityData, getMetricsBaseName, getMinCacheDuration, getNegativeLookupCacheDuration, getPersistentCacheKeyGenerator, getPersistentCacheManager, getRefreshDelayFactor, indexEntityDescriptor, indexesEnabled, initializeFromPersistentCache, isInitializeFromPersistentCacheInBackground, isPersistentCachingEnabled, isRemoveIdleEntityData, lookupCriteria, lookupEntityID, prepareForFiltering, preProcessEntityDescriptor, processNewMetadata, processNewMetadata, processNonEntityIDFetchedEntittiesDescriptor, processNonEntityIDFetchedEntityDescriptor, processPersistentCacheEntry, removeByEntityID, resolve, resolveEntityID, resolveEntityIDs, resolveFromOriginSource, resolveFromOriginSourceWithEntityID, resolveFromOriginSourceWithoutEntityID, setBackgroundInitializationFromCacheDelay, setCleanupTaskInterval, setExpirationWarningThreshold, setIndexes, setInitializationFromCachePredicate, setInitializeFromPersistentCacheInBackground, setMaxCacheDuration, setMaxIdleEntityData, setMetricsBaseName, setMinCacheDuration, setNegativeLookupCacheDuration, setPersistentCacheKeyGenerator, setPersistentCacheManager, setRefreshDelayFactor, setRemoveIdleEntityData, shouldAttemptRefresh
Methods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
doInitialize, filterMetadata, getCriterionPredicateRegistry, getLogPrefix, getMetadataFilter, getParserPool, getUnmarshallerFactory, isFailFastInitialization, isRequireValidMetadata, isSatisfyAnyPredicates, isUseDefaultPredicateRegistry, isValid, lookupIndexedEntityID, newFilterContext, predicateFilterCandidates, preProcessEntitiesDescriptor, releaseMetadataDOM, resolveSingle, setBackingStore, setCriterionPredicateRegistry, setFailFastInitialization, setMetadataFilter, setParserPool, setRequireValidMetadata, setSatisfyAnyPredicates, setUseDefaultPredicateRegistry, unmarshallMetadata
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, 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 net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface org.opensaml.saml.metadata.resolver.MetadataResolver
getMetadataFilter, isRequireValidMetadata, setMetadataFilter, setRequireValidMetadata
Methods inherited from interface net.shibboleth.utilities.java.support.resolver.Resolver
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.http.client.HttpClient client) Constructor.- Parameters:
client
- the instance ofHttpClient
used to fetch remote metadata
-
FunctionDrivenDynamicHTTPMetadataResolver
public FunctionDrivenDynamicHTTPMetadataResolver(@Nullable Timer backgroundTaskTimer, @Nonnull org.apache.http.client.HttpClient client) Constructor.- Parameters:
backgroundTaskTimer
- theTimer
instance used to run resolver background managment tasksclient
- the instance ofHttpClient
used 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
-
buildRequestURL
Build the request URL based on the input criteria set.- Specified by:
buildRequestURL
in classAbstractDynamicHTTPMetadataResolver
- Parameters:
criteria
- the input criteria set- Returns:
- the request URL, or null if it can not be built based on the supplied criteria
-