Package interlok.http.apache.async
Class AsyncWithInterceptors
java.lang.Object
interlok.http.apache.async.AsyncWithInterceptors
- All Implemented Interfaces:
HttpAsyncClientBuilderConfig
@ComponentProfile(since="4.5.0",
summary="Allows you to configure additional interceptors when building the HttpAsyncClient")
public class AsyncWithInterceptors
extends Object
implements HttpAsyncClientBuilderConfig
HttpClientBuilderConfigurator instance that allows additional HttpRequestInterceptor instances to be added to the
outgoing request.In the adapter configuration file this class is aliased as apache-http-async-client-builder-with-request-interceptors 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.nio.client.HttpAsyncClientBuilderconfigure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder) Do any additional configuration.List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder>Additional request interceptors that will be added to theHttpClientBuilder.protected List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder>voidsetRequestInterceptors(List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder> requestInterceptors) Additional request interceptors that will be added to theHttpClientBuilder.withInterceptors(com.adaptris.core.http.apache.request.RequestInterceptorBuilder... interceptors) withInterceptors(List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder> builders)
-
Constructor Details
-
AsyncWithInterceptors
public AsyncWithInterceptors()
-
-
Method Details
-
withInterceptors
public AsyncWithInterceptors withInterceptors(com.adaptris.core.http.apache.request.RequestInterceptorBuilder... interceptors) -
withInterceptors
public AsyncWithInterceptors withInterceptors(List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder> builders) -
requestInterceptors
protected List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder> requestInterceptors() -
configure
public org.apache.http.impl.nio.client.HttpAsyncClientBuilder configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder) throws Exception Description copied from interface:HttpAsyncClientBuilderConfigDo any additional configuration.- Specified by:
configurein interfaceHttpAsyncClientBuilderConfig- Parameters:
builder- the existing builder- Returns:
- a reconfigured builder.
- Throws:
Exception
-
getRequestInterceptors
public List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder> getRequestInterceptors()Additional request interceptors that will be added to theHttpClientBuilder. -
setRequestInterceptors
public void setRequestInterceptors(List<com.adaptris.core.http.apache.request.RequestInterceptorBuilder> requestInterceptors) Additional request interceptors that will be added to theHttpClientBuilder.
-