|
||||||||||
| 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.HTTPMetadataProvider
public class HTTPMetadataProvider
A metadata provider that pulls metadata using an HTTP GET. Metadata is cached until one of these criteria is met:
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)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
cacheMetadata(org.opensaml.xml.XMLObject metadata)
Caches the metadata. |
protected org.opensaml.xml.XMLObject |
fetchMetadata()
Fetches the metadata from the remote server and unmarshalls it. |
int |
getMaxCacheDuration()
Gets the maximum amount of time, in seconds, metadata will be cached for. |
org.opensaml.xml.XMLObject |
getMetadata()
Gets the entire metadata tree, after the registered filter has been applied. |
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. |
void |
initialize()
Initializes the provider and prepares it for use. |
boolean |
maintainExpiredMetadata()
Gets whether cached metadata should be discarded if it expires and can not be refreshed. |
protected void |
refreshMetadata()
Refreshes the metadata cache. |
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)
Sets whether cached metadata should be discarded if it expires and can not be refreshed. |
void |
setMaxCacheDuration(int newDuration)
Sets the maximum amount of time, in seconds, metadata will be cached for. |
void |
setSocketFactory(org.apache.commons.httpclient.protocol.ProtocolSocketFactory newSocketFactory)
Sets the socket factory used to create sockets to the HTTP server. |
| Methods inherited from class org.opensaml.saml2.metadata.provider.AbstractObservableMetadataProvider |
|---|
emitChangeEvent, getObservers |
| Methods inherited from class org.opensaml.saml2.metadata.provider.AbstractMetadataProvider |
|---|
clearDescriptorIndex, filterMetadata, getEntitiesDescriptor, getEntitiesDescriptorByName, getEntityDescriptor, getEntityDescriptorById, getEntityDescriptorById, getParserPool, getRole, getRole, isValid, releaseMetadataDOM, 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, getMetadataFilter, getRole, getRole, requireValidMetadata, setMetadataFilter, setRequireValidMetadata |
| Constructor Detail |
|---|
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| Method Detail |
|---|
public void initialize()
throws MetadataProviderException
MetadataProviderException - thrown if there is a problem fetching, parsing, or processing the metadatapublic java.lang.String getMetadataURI()
public boolean maintainExpiredMetadata()
public void setMaintainExpiredMetadata(boolean maintain)
maintain - whether cached metadata should be discarded if it expires and can not be refreshed
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()
public void setMaxCacheDuration(int newDuration)
newDuration - the maximum amount of time metadata will be cached for
public org.opensaml.xml.XMLObject getMetadata()
throws MetadataProviderException
MetadataProviderException - thrown if the provider can not fetch the metadataprotected void cacheMetadata(org.opensaml.xml.XMLObject metadata)
metadata - metadata to cache
protected void refreshMetadata()
throws MetadataProviderException
MetadataProviderException - thrown if the metadata can not be read, unmarshalled, and filtered
protected org.opensaml.xml.XMLObject fetchMetadata()
throws java.io.IOException,
org.opensaml.xml.io.UnmarshallingException
java.io.IOException - thrown if the metadata can not be fetched from the remote server
org.opensaml.xml.io.UnmarshallingException - thrown if the metadata can not be unmarshalled
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||