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
public class FunctionDrivenDynamicHTTPMetadataResolver extends AbstractDynamicHTTPMetadataResolver
Simple implementation of an HTTP-based dynamic metadata resolver which builds the request URL to process based on aFunctioninstance.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
Fields Modifier and Type Field Description private org.slf4j.LoggerlogLogger.private Function<CriteriaSet,String>requestURLBuilderFunction 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
Constructors Constructor Description FunctionDrivenDynamicHTTPMetadataResolver(Timer backgroundTaskTimer, org.apache.http.client.HttpClient client)Constructor.FunctionDrivenDynamicHTTPMetadataResolver(org.apache.http.client.HttpClient client)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringbuildRequestURL(CriteriaSet criteria)Build the request URL based on the input criteria set.Function<CriteriaSet,String>getRequestURLBuilder()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, 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 Detail
-
log
@Nonnull private final org.slf4j.Logger log
Logger.
-
requestURLBuilder
@Nonnull private Function<CriteriaSet,String> requestURLBuilder
Function for building the request URL.
-
-
Constructor Detail
-
FunctionDrivenDynamicHTTPMetadataResolver
public FunctionDrivenDynamicHTTPMetadataResolver(@Nonnull org.apache.http.client.HttpClient client)Constructor.- Parameters:
client- the instance ofHttpClientused to fetch remote metadata
-
FunctionDrivenDynamicHTTPMetadataResolver
public FunctionDrivenDynamicHTTPMetadataResolver(@Nullable Timer backgroundTaskTimer, @Nonnull org.apache.http.client.HttpClient client)Constructor.- Parameters:
backgroundTaskTimer- theTimerinstance used to run resolver background managment tasksclient- the instance ofHttpClientused to fetch remote metadata
-
-
Method Detail
-
getRequestURLBuilder
@Nonnull public Function<CriteriaSet,String> getRequestURLBuilder()
Get the function which builds the request URL.Defaults to an instance of
HTTPEntityIDRequestURLBuilder.- Returns:
- the request URL builder function instance
-
setRequestURLBuilder
public void setRequestURLBuilder(@Nonnull Function<CriteriaSet,String> builder)Set the function which builds the request URL.Defaults to an instance of
HTTPEntityIDRequestURLBuilder.- Parameters:
builder- the request URL builder function instance
-
buildRequestURL
@Nullable protected String buildRequestURL(@Nonnull CriteriaSet criteria)
Build the request URL based on the input criteria set.- Specified by:
buildRequestURLin classAbstractDynamicHTTPMetadataResolver- Parameters:
criteria- the input criteria set- Returns:
- the request URL, or null if it can not be built based on the supplied criteria
-
-