public class HTTPMetadataProvider extends AbstractReloadingMetadataProvider
AbstractMetadataProvider.initialize()
, if any properties of this
provider are changed.ObservableMetadataProvider.Observer
unmarshallerFactory
コンストラクタと説明 |
---|
HTTPMetadataProvider(String metadataURL,
int requestTimeout)
推奨されていません。
|
HTTPMetadataProvider(Timer backgroundTaskTimer,
org.apache.commons.httpclient.HttpClient client,
String metadataURL)
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
protected org.apache.commons.httpclient.methods.GetMethod |
buildGetMethod()
Builds the HTTP GET method used to fetch the metadata.
|
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.
|
int |
getMaxCacheDuration()
推奨されていません。
|
protected byte[] |
getMetadataBytesFromResponse(org.apache.commons.httpclient.methods.GetMethod getMethod)
Extracts the raw metadata bytes from the response taking in to account possible deflate and GZip compression.
|
protected String |
getMetadataIdentifier()
Gets an identifier which may be used to distinguish this metadata in logging statements.
|
String |
getMetadataURI()
Gets the URL to fetch the metadata.
|
int |
getRequestTimeout()
Gets the length of time in milliseconds to wait for the server to respond.
|
boolean |
maintainExpiredMetadata()
推奨されていません。
use
BaseMetadataProvider.requireValidMetadata() instead |
protected void |
processConditionalRetrievalHeaders(org.apache.commons.httpclient.methods.GetMethod getMethod)
Records the ETag and Last-Modified headers, from the response, if they are present.
|
void |
setBasicCredentials(String username,
String password)
Sets the username and password used to access the metadata URL.
|
void |
setMaintainExpiredMetadata(boolean maintain)
推奨されていません。
|
void |
setMaxCacheDuration(int newDuration)
推奨されていません。
|
void |
setSocketFactory(org.apache.commons.httpclient.protocol.ProtocolSocketFactory newSocketFactory)
推奨されていません。
set this information on HTTP client used by provider
|
computeNextRefreshDelay, doGetMetadata, doInitialization, getExpirationTime, getLastRefresh, getLastUpdate, getMaxRefreshDelay, getMinRefreshDelay, getNextRefresh, getRefreshDelayFactor, inputstreamToByteArray, postProcessMetadata, 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 HTTPMetadataProvider(String metadataURL, int requestTimeout) throws MetadataProviderException
metadataURL
- the URL to fetch the metadatarequestTimeout
- the time, in milliseconds, to wait for the metadata server to respondMetadataProviderException
- thrown if the URL is not a valid URL or the metadata can not be retrieved from
the URLpublic HTTPMetadataProvider(Timer backgroundTaskTimer, org.apache.commons.httpclient.HttpClient client, String metadataURL) throws MetadataProviderException
client
- HTTP client used to pull in remote metadatabackgroundTaskTimer
- timer used to schedule background metadata refresh tasksmetadataURL
- URL to the remove remote metadataMetadataProviderException
- thrown if the HTTP client is null or the metadata URL provided is invalidpublic String getMetadataURI()
public void setBasicCredentials(String username, String password)
username
- the usernamepassword
- the passwordpublic int getRequestTimeout()
public void setSocketFactory(org.apache.commons.httpclient.protocol.ProtocolSocketFactory newSocketFactory)
newSocketFactory
- the socket factory used to produce sockets used to connect to the serverpublic int getMaxCacheDuration()
AbstractReloadingMetadataProvider.getMaxRefreshDelay()
insteadpublic void setMaxCacheDuration(int newDuration)
AbstractReloadingMetadataProvider.setMaxRefreshDelay(long)
insteadnewDuration
- maximum amount of time, in seconds, metadata will be cached forpublic boolean maintainExpiredMetadata()
BaseMetadataProvider.requireValidMetadata()
insteadpublic void setMaintainExpiredMetadata(boolean maintain)
BaseMetadataProvider.setRequireValidMetadata(boolean)
insteadmaintain
- whether cached metadata should be discarded if it expires and can not be refreshed.public void destroy()
destroy
クラス内 AbstractReloadingMetadataProvider
protected String getMetadataIdentifier()
getMetadataIdentifier
クラス内 AbstractReloadingMetadataProvider
protected byte[] fetchMetadata() throws MetadataProviderException
fetchMetadata
クラス内 AbstractReloadingMetadataProvider
MetadataProviderException
- thrown if there is a problem retrieving the metadata from the remote serverprotected org.apache.commons.httpclient.methods.GetMethod buildGetMethod()
protected void processConditionalRetrievalHeaders(org.apache.commons.httpclient.methods.GetMethod getMethod)
getMethod
- GetMethod containing a valid HTTP responseprotected byte[] getMetadataBytesFromResponse(org.apache.commons.httpclient.methods.GetMethod getMethod) throws MetadataProviderException
getMethod
- GetMethod containing a valid HTTP responseMetadataProviderException
- thrown if there is a problem getting the raw metadata bytes from the responseCopyright © 2012. All Rights Reserved.