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.HttpClientTheHttpClientto use.private HttpClientSecurityParametersHTTP client security parameters.private final org.slf4j.LoggerClass logging. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected Map<String,IdPAttribute> retrieveAttributes(HTTPSearch executable) Attempts to retrieve attributes from the data source.voidsetHttpClient(org.apache.http.client.HttpClient client) Set theHttpClientto use.voidSet 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, setValidatorMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, isExportAllAttributes, setExportAllAttributes, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelayMethods 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, setSuppressDisplayInformationMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getIdMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitializedMethods 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
TheHttpClientto 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 theHttpClientto use.- Parameters:
client- client to use
-
setHttpClientSecurityParameters
Set the optional client security parameters.- Parameters:
params- the new client security parameters
-
doInitialize
- Overrides:
doInitializein 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:
retrieveAttributesin 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
-