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 Object
implements HttpClientBuilderConfigurator
Allows you to specify a
CredentialsProvider
as a default for the HttpClientBuilder
.
Most of the time you more likely to configure an HttpAuthenticator
instance on
the producer, but this is included for completeness as a way of configuring the HttpClientBuilder
.
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 -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.impl.client.HttpClientBuilder
configure
(org.apache.http.impl.client.HttpClientBuilder builder) Do any additional configuration.The credentials provider.void
setCredentialsProvider
(CredentialsProviderBuilder credentialsProvider) The credentials provider.withProvider
(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
-
Constructor Details
-
ClientBuilderWithCredentials
public ClientBuilderWithCredentials()
-
-
Method Details
-
configure
public org.apache.http.impl.client.HttpClientBuilder configure(org.apache.http.impl.client.HttpClientBuilder builder) throws Exception Description copied from interface:HttpClientBuilderConfigurator
Do any additional configuration.- Specified by:
configure
in interfaceHttpClientBuilderConfigurator
- Parameters:
builder
- the existing builder- Returns:
- a reconfigured builder.
- Throws:
Exception
-
withProvider
-
getCredentialsProvider
The credentials provider.If not explicitly configured, then the resulting
CredentialsProvider
is aorg.apache.http.impl.client.SystemDefaultCredentialsProvider
with no configuration. -
setCredentialsProvider
The credentials provider.If not explicitly configured, then the resulting
CredentialsProvider
is aorg.apache.http.impl.client.SystemDefaultCredentialsProvider
with no configuration.
-