Class AsyncWithCredentials

java.lang.Object
interlok.http.apache.async.AsyncWithCredentials
All Implemented Interfaces:
HttpAsyncClientBuilderConfig

@ComponentProfile(since="4.5.0", summary="Allows you to configure a \'CredentialsProvider\' when building the HttpClient") public class AsyncWithCredentials extends Object implements HttpAsyncClientBuilderConfig
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 apache-http-async-client-builder-with-credentials which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • AsyncWithCredentials

      public AsyncWithCredentials()
  • Method Details

    • configure

      public org.apache.http.impl.nio.client.HttpAsyncClientBuilder configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder) throws Exception
      Description copied from interface: HttpAsyncClientBuilderConfig
      Do any additional configuration.
      Specified by:
      configure in interface HttpAsyncClientBuilderConfig
      Parameters:
      builder - the existing builder
      Returns:
      a reconfigured builder.
      Throws:
      Exception
    • withProvider

      public AsyncWithCredentials withProvider(interlok.http.apache.credentials.CredentialsProviderBuilder builder)
    • getCredentialsProvider

      public interlok.http.apache.credentials.CredentialsProviderBuilder getCredentialsProvider()
      The credentials provider.

      If not explicitly configured, then the resulting CredentialsProvider is a org.apache.http.impl.client.SystemDefaultCredentialsProvider with no configuration.

    • setCredentialsProvider

      public void setCredentialsProvider(interlok.http.apache.credentials.CredentialsProviderBuilder credentialsProvider)
      The credentials provider.

      If not explicitly configured, then the resulting CredentialsProvider is a org.apache.http.impl.client.SystemDefaultCredentialsProvider with no configuration.