public class GrizzlyHttpClient extends Object implements org.mule.runtime.http.api.client.HttpClient
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
GrizzlyHttpClient.RequestConfigurer |
| Modifier and Type | Field and Description |
|---|---|
protected com.ning.http.client.AsyncHttpClient |
asyncHttpClient |
static String |
HOST_SEPARATOR |
| Constructor and Description |
|---|
GrizzlyHttpClient(org.mule.runtime.http.api.client.HttpClientConfiguration config,
org.mule.runtime.api.scheduler.SchedulerService schedulerService,
org.mule.runtime.api.scheduler.SchedulerConfig schedulersConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected com.ning.http.client.ProxyServer |
buildProxy(org.mule.runtime.http.api.client.proxy.ProxyConfig proxyConfig) |
protected com.ning.http.client.Request |
createGrizzlyRequest(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication) |
protected com.ning.http.client.RequestBuilder |
createRequestBuilder(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
GrizzlyHttpClient.RequestConfigurer requestConfigurer) |
protected void |
doConfigureProxy(com.ning.http.client.AsyncHttpClientConfig.Builder builder,
org.mule.runtime.http.api.client.proxy.ProxyConfig proxyConfig) |
protected org.mule.runtime.http.api.client.proxy.ProxyConfig |
getProxyConfig() |
protected void |
populateHeaders(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
com.ning.http.client.RequestBuilder builder) |
static void |
refreshSystemProperties() |
org.mule.runtime.http.api.domain.message.response.HttpResponse |
send(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication) |
org.mule.runtime.http.api.domain.message.response.HttpResponse |
sendAndDefer(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication)
Blocking send which uses a
PipedOutputStream to populate the HTTP response as it arrives and propagates a
PipedInputStream as soon as the response headers are parsed. |
org.mule.runtime.http.api.domain.message.response.HttpResponse |
sendAndWait(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication)
Blocking send which waits to load the whole response to memory before propagating it.
|
CompletableFuture<org.mule.runtime.http.api.domain.message.response.HttpResponse> |
sendAsync(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication) |
void |
start() |
void |
stop() |
public static final String HOST_SEPARATOR
protected com.ning.http.client.AsyncHttpClient asyncHttpClient
public GrizzlyHttpClient(org.mule.runtime.http.api.client.HttpClientConfiguration config,
org.mule.runtime.api.scheduler.SchedulerService schedulerService,
org.mule.runtime.api.scheduler.SchedulerConfig schedulersConfig)
public void start()
start in interface org.mule.runtime.http.api.client.HttpClientprotected void doConfigureProxy(com.ning.http.client.AsyncHttpClientConfig.Builder builder,
org.mule.runtime.http.api.client.proxy.ProxyConfig proxyConfig)
protected final com.ning.http.client.ProxyServer buildProxy(org.mule.runtime.http.api.client.proxy.ProxyConfig proxyConfig)
public org.mule.runtime.http.api.domain.message.response.HttpResponse send(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication)
throws IOException,
TimeoutException
send in interface org.mule.runtime.http.api.client.HttpClientIOExceptionTimeoutExceptionpublic org.mule.runtime.http.api.domain.message.response.HttpResponse sendAndDefer(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication)
throws IOException,
TimeoutException
PipedOutputStream to populate the HTTP response as it arrives and propagates a
PipedInputStream as soon as the response headers are parsed.
Because of the internal buffer used to hold the arriving chunks, the response MUST be eventually read or the worker threads
will block waiting to allocate them. Likewise, read/write speed differences could cause issues. The buffer size can be
customized for these reason.IOExceptionTimeoutExceptionpublic org.mule.runtime.http.api.domain.message.response.HttpResponse sendAndWait(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication)
throws IOException,
TimeoutException
IOExceptionTimeoutExceptionpublic CompletableFuture<org.mule.runtime.http.api.domain.message.response.HttpResponse> sendAsync(org.mule.runtime.http.api.domain.message.request.HttpRequest request, int responseTimeout, boolean followRedirects, org.mule.runtime.http.api.client.auth.HttpAuthentication authentication)
sendAsync in interface org.mule.runtime.http.api.client.HttpClientprotected com.ning.http.client.Request createGrizzlyRequest(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.auth.HttpAuthentication authentication)
throws IOException
IOExceptionprotected com.ning.http.client.RequestBuilder createRequestBuilder(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
GrizzlyHttpClient.RequestConfigurer requestConfigurer)
throws IOException
IOExceptionprotected void populateHeaders(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
com.ning.http.client.RequestBuilder builder)
protected org.mule.runtime.http.api.client.proxy.ProxyConfig getProxyConfig()
public void stop()
stop in interface org.mule.runtime.http.api.client.HttpClientpublic static void refreshSystemProperties()
Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.