Package interlok.http.apache.credentials
Class ClientBuilderWithCredentials
- java.lang.Object
-
- interlok.http.apache.credentials.ClientBuilderWithCredentials
-
- All Implemented Interfaces:
HttpClientBuilderConfigurator
@ComponentProfile(since="4.5.0", summary="Allows you to configure a \'CredentialsProvider\' when building the HttpClient") public class ClientBuilderWithCredentials extends java.lang.Object implements HttpClientBuilderConfiguratorAllows you to specify aCredentialsProvideras a default for theHttpClientBuilder.Most of the time you more likely to configure an
HttpAuthenticatorinstance on the producer, but this is included for completeness as a way of configuring theHttpClientBuilder.In the adapter configuration file this class is aliased as credentials-provider-apache-http-client-builder which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description ClientBuilderWithCredentials()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.impl.client.HttpClientBuilderconfigure(org.apache.http.impl.client.HttpClientBuilder builder)Do any additional configuration.CredentialsProviderBuildergetCredentialsProvider()The credentials provider.voidsetCredentialsProvider(CredentialsProviderBuilder credentialsProvider)The credentials provider.ClientBuilderWithCredentialswithProvider(CredentialsProviderBuilder builder)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.http.apache.HttpClientBuilderConfigurator
configure
-
-
-
-
Method Detail
-
configure
public org.apache.http.impl.client.HttpClientBuilder configure(org.apache.http.impl.client.HttpClientBuilder builder) throws java.lang.ExceptionDescription copied from interface:HttpClientBuilderConfiguratorDo any additional configuration.- Specified by:
configurein interfaceHttpClientBuilderConfigurator- Parameters:
builder- the existing builder- Returns:
- a reconfigured builder.
- Throws:
java.lang.Exception
-
withProvider
public ClientBuilderWithCredentials withProvider(CredentialsProviderBuilder builder)
-
getCredentialsProvider
public CredentialsProviderBuilder getCredentialsProvider()
The credentials provider.If not explicitly configured, then the resulting
CredentialsProvideris aorg.apache.http.impl.client.SystemDefaultCredentialsProviderwith no configuration.
-
setCredentialsProvider
public void setCredentialsProvider(CredentialsProviderBuilder credentialsProvider)
The credentials provider.If not explicitly configured, then the resulting
CredentialsProvideris aorg.apache.http.impl.client.SystemDefaultCredentialsProviderwith no configuration.
-
-