|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.saml2.metadata.provider.BaseMetadataProvider
org.opensaml.saml2.metadata.provider.AbstractMetadataProvider
org.opensaml.saml2.metadata.provider.AbstractObservableMetadataProvider
org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider
org.opensaml.saml2.metadata.provider.HTTPMetadataProvider
public class HTTPMetadataProvider
A metadata provider that pulls metadata using an HTTP GET. Metadata is cached until one of these criteria is met:
AbstractMetadataProvider.initialize(), if any properties of this
provider are changed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opensaml.saml2.metadata.provider.ObservableMetadataProvider |
|---|
ObservableMetadataProvider.Observer |
| Field Summary |
|---|
| Fields inherited from class org.opensaml.saml2.metadata.provider.BaseMetadataProvider |
|---|
unmarshallerFactory |
| Constructor Summary | |
|---|---|
HTTPMetadataProvider(java.lang.String metadataURL,
int requestTimeout)
Deprecated. |
|
HTTPMetadataProvider(java.util.Timer backgroundTaskTimer,
org.apache.commons.httpclient.HttpClient client,
java.lang.String metadataURL)
Constructor. |
|
| Method Summary | |
|---|---|
protected org.apache.commons.httpclient.methods.GetMethod |
buildGetMethod()
Builds the HTTP GET method used to fetch the metadata. |
protected byte[] |
fetchMetadata()
Gets the metadata document from the remote server. |
int |
getMaxCacheDuration()
Deprecated. use AbstractReloadingMetadataProvider.getMaxRefreshDelay() instead |
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 java.lang.String |
getMetadataIdentifier()
Gets an identifier which may be used to distinguish this metadata in logging statements. |
java.lang.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()
Deprecated. 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(java.lang.String username,
java.lang.String password)
Sets the username and password used to access the metadata URL. |
void |
setMaintainExpiredMetadata(boolean maintain)
Deprecated. use BaseMetadataProvider.setRequireValidMetadata(boolean) instead |
void |
setMaxCacheDuration(int newDuration)
Deprecated. use AbstractReloadingMetadataProvider.setMaxRefreshDelay(long) instead |
void |
setSocketFactory(org.apache.commons.httpclient.protocol.ProtocolSocketFactory newSocketFactory)
Deprecated. set this information on HTTP client used by provider |
| Methods inherited from class org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider |
|---|
computeNextRefreshDelay, doGetMetadata, doInitialization, getExpirationTime, getLastRefresh, getLastUpdate, getMaxRefreshDelay, getMinRefreshDelay, getNextRefresh, getRefreshDelayFactor, inputstreamToByteArray, postProcessMetadata, processCachedMetadata, processNewMetadata, processNonExpiredMetadata, processPreExpiredMetadata, refresh, setMaxRefreshDelay, setMinRefreshDelay, setRefreshDelayFactor, unmarshallMetadata |
| Methods inherited from class org.opensaml.saml2.metadata.provider.AbstractObservableMetadataProvider |
|---|
emitChangeEvent, getObservers |
| Methods inherited from class org.opensaml.saml2.metadata.provider.AbstractMetadataProvider |
|---|
clearDescriptorIndex, doGetEntitiesDescriptor, doGetEntityDescriptor, doGetRole, doGetRole, filterMetadata, getEntitiesDescriptor, getEntitiesDescriptorByName, getEntityDescriptor, getEntityDescriptorById, getEntityDescriptorById, getMetadata, getParserPool, getRole, getRole, initialize, isFailFastInitialization, isInitialized, isValid, releaseMetadataDOM, setFailFastInitialization, setInitialized, setParserPool, unmarshallMetadata |
| Methods inherited from class org.opensaml.saml2.metadata.provider.BaseMetadataProvider |
|---|
getMetadataFilter, requireValidMetadata, setMetadataFilter, setRequireValidMetadata |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensaml.saml2.metadata.provider.MetadataProvider |
|---|
getEntitiesDescriptor, getEntityDescriptor, getMetadata, getMetadataFilter, getRole, getRole, requireValidMetadata, setMetadataFilter, setRequireValidMetadata |
| Constructor Detail |
|---|
@Deprecated
public HTTPMetadataProvider(java.lang.String metadataURL,
int requestTimeout)
throws MetadataProviderException
metadataURL - the URL to fetch the metadatarequestTimeout - the time, in milliseconds, to wait for the metadata server to respond
MetadataProviderException - thrown if the URL is not a valid URL or the metadata can not be retrieved from
the URL
public HTTPMetadataProvider(java.util.Timer backgroundTaskTimer,
org.apache.commons.httpclient.HttpClient client,
java.lang.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 metadata
MetadataProviderException - thrown if the HTTP client is null or the metadata URL provided is invalid| Method Detail |
|---|
public java.lang.String getMetadataURI()
public void setBasicCredentials(java.lang.String username,
java.lang.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() instead
public void setMaxCacheDuration(int newDuration)
AbstractReloadingMetadataProvider.setMaxRefreshDelay(long) instead
newDuration - maximum amount of time, in seconds, metadata will be cached forpublic boolean maintainExpiredMetadata()
BaseMetadataProvider.requireValidMetadata() instead
public void setMaintainExpiredMetadata(boolean maintain)
BaseMetadataProvider.setRequireValidMetadata(boolean) instead
maintain - whether cached metadata should be discarded if it expires and can not be refreshed.protected java.lang.String getMetadataIdentifier()
getMetadataIdentifier in class AbstractReloadingMetadataProvider
protected byte[] fetchMetadata()
throws MetadataProviderException
fetchMetadata in class AbstractReloadingMetadataProviderMetadataProviderException - 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 response
protected byte[] getMetadataBytesFromResponse(org.apache.commons.httpclient.methods.GetMethod getMethod)
throws MetadataProviderException
getMethod - GetMethod containing a valid HTTP response
MetadataProviderException - thrown if there is a problem getting the raw metadata bytes from the response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||