public class EEGrizzlyHttpClient
extends org.mule.service.http.impl.service.client.GrizzlyHttpClient
GrizzlyHttpClient.
Even though the name grizzly is in the class name, it uses the AHC API and not grizzly stuff. It is just to mark it as
a specialization of Mule's GrizzlyHttpClient.
In order to optimize the retries (ensuring each retry is made against a different address each time), this object has state, keeping for each request which addresses haven't been tried yet.
| Constructor and Description |
|---|
EEGrizzlyHttpClient(org.mule.runtime.http.api.client.HttpClientConfiguration config,
org.mule.runtime.api.scheduler.SchedulerService schedulerService,
org.mule.runtime.api.scheduler.SchedulerConfig schedulersConfig,
HostNameResolver hostNameResolver) |
| Modifier and Type | Method and Description |
|---|---|
protected com.ning.http.client.RequestBuilder |
createRequestBuilder(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.client.HttpRequestOptions options,
org.mule.service.http.impl.service.client.GrizzlyHttpClient.RequestConfigurer requestConfigurer) |
protected void |
doConfigureProxy(com.ning.http.client.AsyncHttpClientConfig.Builder builder,
org.mule.runtime.http.api.client.proxy.ProxyConfig proxyConfig) |
int |
getRequestBuildersSize() |
protected boolean |
hasMoreAddressesToRetry(org.mule.runtime.http.api.domain.message.request.HttpRequest request) |
protected void |
logAddressesDepleted(org.mule.runtime.http.api.domain.message.request.HttpRequest request) |
protected void |
logAddressRetrying(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
Throwable e) |
protected void |
onCompleteRedirect(org.mule.runtime.http.api.domain.message.request.HttpRequest redirectRequest) |
CompletableFuture<org.mule.runtime.http.api.ws.WebSocket> |
openWebSocket(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.client.HttpRequestOptions requestOptions,
String socketId,
org.mule.runtime.http.api.client.ws.WebSocketCallback callback) |
static void |
refreshSystemProperties() |
org.mule.runtime.http.api.domain.message.response.HttpResponse |
send(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.client.HttpRequestOptions options) |
CompletableFuture<org.mule.runtime.http.api.domain.message.response.HttpResponse> |
sendAsync(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.client.HttpRequestOptions options) |
createGrizzlyRequest, getProxyConfig, populateHeaders, start, stoppublic EEGrizzlyHttpClient(org.mule.runtime.http.api.client.HttpClientConfiguration config,
org.mule.runtime.api.scheduler.SchedulerService schedulerService,
org.mule.runtime.api.scheduler.SchedulerConfig schedulersConfig,
HostNameResolver hostNameResolver)
config - the http client configuration to use.schedulerService - the provider of the thread pools to be used by the Grizzly clientschedulersConfig - the base configuration for the created inner schedulers.hostNameResolver - the object responsible on providing the addresses for each hostName.protected void doConfigureProxy(com.ning.http.client.AsyncHttpClientConfig.Builder builder,
org.mule.runtime.http.api.client.proxy.ProxyConfig proxyConfig)
doConfigureProxy in class org.mule.service.http.impl.service.client.GrizzlyHttpClientprotected com.ning.http.client.RequestBuilder createRequestBuilder(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.client.HttpRequestOptions options,
org.mule.service.http.impl.service.client.GrizzlyHttpClient.RequestConfigurer requestConfigurer)
throws IOException
createRequestBuilder in class org.mule.service.http.impl.service.client.GrizzlyHttpClientIOExceptionprotected void onCompleteRedirect(org.mule.runtime.http.api.domain.message.request.HttpRequest redirectRequest)
onCompleteRedirect in class org.mule.service.http.impl.service.client.GrizzlyHttpClientpublic org.mule.runtime.http.api.domain.message.response.HttpResponse send(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.client.HttpRequestOptions options)
throws IOException,
TimeoutException
send in interface org.mule.runtime.http.api.client.HttpClientsend in class org.mule.service.http.impl.service.client.GrizzlyHttpClientIOExceptionTimeoutExceptionpublic CompletableFuture<org.mule.runtime.http.api.domain.message.response.HttpResponse> sendAsync(org.mule.runtime.http.api.domain.message.request.HttpRequest request, org.mule.runtime.http.api.client.HttpRequestOptions options)
sendAsync in interface org.mule.runtime.http.api.client.HttpClientsendAsync in class org.mule.service.http.impl.service.client.GrizzlyHttpClientpublic CompletableFuture<org.mule.runtime.http.api.ws.WebSocket> openWebSocket(org.mule.runtime.http.api.domain.message.request.HttpRequest request, org.mule.runtime.http.api.client.HttpRequestOptions requestOptions, String socketId, org.mule.runtime.http.api.client.ws.WebSocketCallback callback)
protected void logAddressRetrying(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
Throwable e)
protected void logAddressesDepleted(org.mule.runtime.http.api.domain.message.request.HttpRequest request)
protected boolean hasMoreAddressesToRetry(org.mule.runtime.http.api.domain.message.request.HttpRequest request)
public static void refreshSystemProperties()
public int getRequestBuildersSize()
Copyright © 2003–2024 MuleSoft, Inc.. All rights reserved.