Package com.consol.citrus.http.client
Class BasicAuthClientHttpRequestFactory
- java.lang.Object
-
- com.consol.citrus.http.client.BasicAuthClientHttpRequestFactory
-
- All Implemented Interfaces:
com.consol.citrus.common.InitializingPhase,org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
public class BasicAuthClientHttpRequestFactory extends Object implements org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>, com.consol.citrus.common.InitializingPhase
Factory bean constructing a client request factory with user credentials for basic authentication.- Since:
- 1.2
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description BasicAuthClientHttpRequestFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.client.HttpComponentsClientHttpRequestFactorygetObject()Construct the client factory bean with user credentials.Class<?>getObjectType()Get the object type.voidinitialize()booleanisSingleton()Is singleton bean?voidsetAuthScope(org.apache.http.auth.AuthScope authScope)Sets the authScope.voidsetCredentials(org.apache.http.auth.Credentials credentials)Sets the credentials.voidsetHttpClient(org.apache.http.client.HttpClient httpClient)Sets the httpClient.voidsetParams(Map<String,Object> params)Sets the params.
-
-
-
Method Detail
-
getObject
public org.springframework.http.client.HttpComponentsClientHttpRequestFactory getObject() throws ExceptionConstruct the client factory bean with user credentials.- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>- Throws:
Exception
-
getObjectType
public Class<?> getObjectType()
Get the object type.- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
-
isSingleton
public boolean isSingleton()
Is singleton bean?- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
-
initialize
public void initialize()
- Specified by:
initializein interfacecom.consol.citrus.common.InitializingPhase
-
setCredentials
public void setCredentials(org.apache.http.auth.Credentials credentials)
Sets the credentials.- Parameters:
credentials- the credentials to set
-
setAuthScope
public void setAuthScope(org.apache.http.auth.AuthScope authScope)
Sets the authScope.- Parameters:
authScope- the authScope to set
-
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
Sets the httpClient.- Parameters:
httpClient- the httpClient to set
-
-