Class 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 Detail

      • BasicAuthClientHttpRequestFactory

        public BasicAuthClientHttpRequestFactory()
    • Method Detail

      • getObject

        public org.springframework.http.client.HttpComponentsClientHttpRequestFactory getObject()
                                                                                         throws Exception
        Construct the client factory bean with user credentials.
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
        Throws:
        Exception
      • getObjectType

        public Class<?> getObjectType()
        Get the object type.
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
      • isSingleton

        public boolean isSingleton()
        Is singleton bean?
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
      • initialize

        public void initialize()
        Specified by:
        initialize in interface com.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
      • setParams

        public void setParams​(Map<String,​Object> params)
        Sets the params.
        Parameters:
        params - the params to set