Class HTTPDataConnector
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<Map<String,IdPAttribute>>
net.shibboleth.idp.attribute.resolver.AbstractDataConnector
net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector<HTTPSearch,HTTPResponseMappingStrategy>
net.shibboleth.idp.attribute.resolver.dc.http.impl.HTTPDataConnector
- All Implemented Interfaces:
DataConnector
,ResolverPlugin<Map<String,
,IdPAttribute>> Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
public class HTTPDataConnector
extends AbstractSearchDataConnector<HTTPSearch,HTTPResponseMappingStrategy>
This class implements a
DataConnector
that obtains data from an HTTP service.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.http.client.HttpClient
TheHttpClient
to use.private HttpClientSecurityParameters
HTTP client security parameters.private final org.slf4j.Logger
Class logging. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected Map<String,
IdPAttribute> retrieveAttributes
(HTTPSearch executable) Attempts to retrieve attributes from the data source.void
setHttpClient
(org.apache.http.client.HttpClient client) Set theHttpClient
to use.void
Set the optional client security parameters.Methods inherited from class net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector
doDataConnectorResolve, getExecutableSearchBuilder, getMappingStrategy, getResultsCache, getValidator, isFailFastInitialize, setExecutableSearchBuilder, setFailFastInitialize, setMappingStrategy, setResultsCache, setValidator
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, isExportAllAttributes, setExportAllAttributes, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelay
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
addDisplayInformation, doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, isSuppressDisplayInformation, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setProfileContextStrategy, setPropagateResolutionExceptions, setSuppressDisplayInformation
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface org.springframework.beans.factory.DisposableBean
destroy
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
Methods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logging. -
httpClient
TheHttpClient
to use. -
httpClientSecurityParameters
HTTP client security parameters.
-
-
Constructor Details
-
HTTPDataConnector
public HTTPDataConnector()Constructor.
-
-
Method Details
-
setHttpClient
public void setHttpClient(@Nonnull org.apache.http.client.HttpClient client) Set theHttpClient
to use.- Parameters:
client
- client to use
-
setHttpClientSecurityParameters
Set the optional client security parameters.- Parameters:
params
- the new client security parameters
-
doInitialize
- Overrides:
doInitialize
in classAbstractSearchDataConnector<HTTPSearch,
HTTPResponseMappingStrategy> - Throws:
ComponentInitializationException
-
retrieveAttributes
@Nullable protected Map<String,IdPAttribute> retrieveAttributes(@Nonnull HTTPSearch executable) throws ResolutionException Attempts to retrieve attributes from the data source.- Specified by:
retrieveAttributes
in classAbstractSearchDataConnector<HTTPSearch,
HTTPResponseMappingStrategy> - Parameters:
executable
- used to retrieve data from the data source- Returns:
- attributes
- Throws:
ResolutionException
- thrown if there is a problem retrieving data from the data source
-