public class FileBackedHTTPMetadataResolver extends HTTPMetadataResolver
AbstractInitializableComponent.initialize(), if any properties of this
provider are changed.AbstractBatchMetadataResolver.BatchEntityBackingStoreAbstractMetadataResolver.EntityBackingStore| Constructor and Description |
|---|
FileBackedHTTPMetadataResolver(org.apache.http.client.HttpClient client,
String metadataURL,
String backupFilePath)
Constructor.
|
FileBackedHTTPMetadataResolver(Timer backgroundTaskTimer,
org.apache.http.client.HttpClient client,
String metadataURL,
String backupFilePath)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected byte[] |
fetchMetadata()
Gets the metadata document from the remote server.
|
protected void |
initMetadataResolver()
Subclasses should override this method to perform any initialization logic necessary.
|
protected void |
postProcessMetadata(byte[] metadataBytes,
Document metadataDom,
XMLObject originalMetadata,
XMLObject filteredMetadata)
Post-processing hook called after new metadata has been unmarshalled, filtered, and the DOM released (from the
XMLObject) but before the metadata is saved off. |
protected void |
setBackupFile(String backupFilePath)
Sets the file used to backup metadata.
|
protected void |
validateBackupFile(File backupFile)
Validate the basic properties of the specified metadata backup file, for example that it
exists and/or can be created; that it is not a directory; and that it is readable and writable.
|
buildHttpClientContext, buildHttpGet, checkTLSCredentialTrusted, getMetadataBytesFromResponse, getMetadataIdentifier, getMetadataURI, processConditionalRetrievalHeaders, setBasicCredentials, setBasicCredentialsWithScope, setTLSTrustEnginecomputeNextRefreshDelay, getExpirationTime, getLastRefresh, getLastUpdate, getMaxRefreshDelay, getMinRefreshDelay, getNextRefresh, getRefreshDelayFactor, inputstreamToByteArray, processCachedMetadata, processNewMetadata, processNonExpiredMetadata, processPreExpiredMetadata, refresh, setCacheSourceMetadata, setMaxRefreshDelay, setMinRefreshDelay, setRefreshDelayFactor, unmarshallMetadatacreateNewBackingStore, getBackingStore, getCachedFilteredMetadata, getCachedOriginalMetadata, isCacheSourceMetadata, iterator, preProcessNewMetadata, resolvedoInitialize, filterMetadata, getMetadataFilter, getParserPool, getUnmarshallerFactory, indexEntityDescriptor, isFailFastInitialization, isRequireValidMetadata, isValid, lookupEntityID, lookupIndexedEntityID, preProcessEntitiesDescriptor, preProcessEntityDescriptor, releaseMetadataDOM, removeByEntityID, resolveSingle, setBackingStore, setFailFastInitialization, setMetadataFilter, setParserPool, setRequireValidMetadata, unmarshallMetadatasetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetadataFilter, isRequireValidMetadata, setMetadataFilter, setRequireValidMetadataresolve, resolveSinglegetIdforEach, spliteratorpublic FileBackedHTTPMetadataResolver(org.apache.http.client.HttpClient client,
String metadataURL,
String backupFilePath)
throws net.shibboleth.utilities.java.support.resolver.ResolverException
client - HTTP client used to fetch remote metadatametadataURL - the URL to fetch the metadatabackupFilePath - the file that will keep a backup copy of the metadata,net.shibboleth.utilities.java.support.resolver.ResolverException - thrown if the URL is not a valid URL, the metadata can not be retrieved from
the URLpublic FileBackedHTTPMetadataResolver(Timer backgroundTaskTimer, org.apache.http.client.HttpClient client, String metadataURL, String backupFilePath) throws net.shibboleth.utilities.java.support.resolver.ResolverException
client - HTTP client used to fetch remote metadatabackgroundTaskTimer - timer used to schedule background metadata refresh tasksmetadataURL - the URL to fetch the metadatabackupFilePath - the file that will keep a backup copy of the metadata,net.shibboleth.utilities.java.support.resolver.ResolverException - thrown if the URL is not a valid URL, the metadata can not be retrieved from
the URLprotected void doDestroy()
doDestroy in class HTTPMetadataResolverprotected void initMetadataResolver()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
initMetadataResolver in class AbstractReloadingMetadataResolvernet.shibboleth.utilities.java.support.component.ComponentInitializationException - thrown if there is a problem initializing the providerprotected void setBackupFile(String backupFilePath) throws net.shibboleth.utilities.java.support.resolver.ResolverException
backupFilePath - path to the backup filenet.shibboleth.utilities.java.support.resolver.ResolverException - thrown if the backup file is not read/writable or creatableprotected void validateBackupFile(File backupFile) throws net.shibboleth.utilities.java.support.resolver.ResolverException
backupFile - the file to evaluatenet.shibboleth.utilities.java.support.resolver.ResolverException - if file does not pass basic properties required of a metadata backup fileprotected byte[] fetchMetadata()
throws net.shibboleth.utilities.java.support.resolver.ResolverException
fetchMetadata in class HTTPMetadataResolvernet.shibboleth.utilities.java.support.resolver.ResolverException - thrown if there is a problem retrieving the metadata from the remote serverprotected void postProcessMetadata(byte[] metadataBytes,
Document metadataDom,
XMLObject originalMetadata,
XMLObject filteredMetadata)
throws net.shibboleth.utilities.java.support.resolver.ResolverException
XMLObject) but before the metadata is saved off. Any exception thrown by this hook will cause the
retrieved metadata to be discarded.
The default implementation of this method is a no-oppostProcessMetadata in class AbstractReloadingMetadataResolvermetadataBytes - original raw metadata bytes retrieved via AbstractReloadingMetadataResolver.fetchMetadata()metadataDom - original metadata after it has been parsed in to a DOM documentoriginalMetadata - original metadata prior to being filtered, with its DOM releasedfilteredMetadata - metadata after it has been run through all registered filters and its DOM releasednet.shibboleth.utilities.java.support.resolver.ResolverException - thrown if there is a problem with the provided dataCopyright © 2021. All rights reserved.