public class FileBackedHTTPMetadataProvider extends HTTPMetadataProvider
AbstractMetadataProvider.initialize()
, if any properties of this
provider are changed.ObservableMetadataProvider.Observer
unmarshallerFactory
コンストラクタと説明 |
---|
FileBackedHTTPMetadataProvider(String metadataURL,
int requestTimeout,
String backupFilePath)
推奨されていません。
|
FileBackedHTTPMetadataProvider(Timer backgroundTaskTimer,
org.apache.commons.httpclient.HttpClient client,
String metadataURL,
String backupFilePath)
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
void |
destroy()
Destroys the metadata provider and frees any resources current held by it.
|
protected byte[] |
fetchMetadata()
Gets the metadata document from the remote server.
|
protected void |
postProcessMetadata(byte[] metadataBytes,
Document metadataDom,
XMLObject metadata)
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.
|
buildGetMethod, getMaxCacheDuration, getMetadataBytesFromResponse, getMetadataIdentifier, getMetadataURI, getRequestTimeout, maintainExpiredMetadata, processConditionalRetrievalHeaders, setBasicCredentials, setMaintainExpiredMetadata, setMaxCacheDuration, setSocketFactory
computeNextRefreshDelay, doGetMetadata, doInitialization, getExpirationTime, getLastRefresh, getLastUpdate, getMaxRefreshDelay, getMinRefreshDelay, getNextRefresh, getRefreshDelayFactor, inputstreamToByteArray, processCachedMetadata, processNewMetadata, processNonExpiredMetadata, processPreExpiredMetadata, refresh, setMaxRefreshDelay, setMinRefreshDelay, setRefreshDelayFactor, unmarshallMetadata
emitChangeEvent, getObservers
clearDescriptorIndex, doGetEntitiesDescriptor, doGetEntityDescriptor, doGetRole, doGetRole, filterMetadata, getEntitiesDescriptor, getEntitiesDescriptorByName, getEntityDescriptor, getEntityDescriptorById, getEntityDescriptorById, getMetadata, getParserPool, getRole, getRole, initialize, isFailFastInitialization, isInitialized, isValid, releaseMetadataDOM, setFailFastInitialization, setInitialized, setParserPool, unmarshallMetadata
getMetadataFilter, requireValidMetadata, setMetadataFilter, setRequireValidMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEntitiesDescriptor, getEntityDescriptor, getMetadata, getMetadataFilter, getRole, getRole, requireValidMetadata, setMetadataFilter, setRequireValidMetadata
@Deprecated public FileBackedHTTPMetadataProvider(String metadataURL, int requestTimeout, String backupFilePath) throws MetadataProviderException
metadataURL
- the URL to fetch the metadatarequestTimeout
- the time, in milliseconds, to wait for the metadata server to respondbackupFilePath
- the file that will keep a backup copy of the metadata,MetadataProviderException
- thrown if the URL is not a valid URL, the metadata can not be retrieved from
the URL, the given file can not be created or written topublic FileBackedHTTPMetadataProvider(Timer backgroundTaskTimer, org.apache.commons.httpclient.HttpClient client, String metadataURL, String backupFilePath) throws MetadataProviderException
client
- HTTP client used to fetch remove 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,MetadataProviderException
- thrown if the URL is not a valid URL, the metadata can not be retrieved from
the URL, the given file can not be created or written topublic void destroy()
destroy
クラス内 HTTPMetadataProvider
protected void setBackupFile(String backupFilePath) throws MetadataProviderException
backupFilePath
- path to the backup fileMetadataProviderException
- thrown if the backup file is not read/writable or creatableprotected byte[] fetchMetadata() throws MetadataProviderException
fetchMetadata
クラス内 HTTPMetadataProvider
MetadataProviderException
- thrown if there is a problem retrieving the metadata from the remote serverprotected void postProcessMetadata(byte[] metadataBytes, Document metadataDom, XMLObject metadata) throws MetadataProviderException
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
クラス内 AbstractReloadingMetadataProvider
metadataBytes
- raw metadata bytes retrieved via AbstractReloadingMetadataProvider.fetchMetadata()
metadataDom
- metadata after it has been parsed in to a DOM documentmetadata
- metadata after it has been run through all registered filters and its DOM releasedMetadataProviderException
- thrown if there is a problem with the provided dataCopyright © 2012. All Rights Reserved.