public class GrizzlyHttpClient extends Object implements org.mule.runtime.http.api.client.HttpClient
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
GrizzlyHttpClient.RequestConfigurer |
| Constructor and Description |
|---|
GrizzlyHttpClient(org.mule.runtime.http.api.client.HttpClientConfiguration config,
org.mule.runtime.core.api.scheduler.SchedulerService schedulerService,
org.mule.runtime.core.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.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) |
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.HttpRequestAuthentication authentication) |
void |
send(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.HttpRequestAuthentication authentication,
org.mule.runtime.http.api.client.async.ResponseHandler handler) |
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.HttpRequestAuthentication 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.HttpRequestAuthentication authentication)
Blocking send which waits to load the whole response to memory before propagating it.
|
void |
start() |
void |
stop() |
public GrizzlyHttpClient(org.mule.runtime.http.api.client.HttpClientConfiguration config,
org.mule.runtime.core.api.scheduler.SchedulerService schedulerService,
org.mule.runtime.core.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.HttpRequestAuthentication 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.HttpRequestAuthentication 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.HttpRequestAuthentication authentication)
throws IOException,
TimeoutException
IOExceptionTimeoutExceptionpublic void send(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
int responseTimeout,
boolean followRedirects,
org.mule.runtime.http.api.client.HttpRequestAuthentication authentication,
org.mule.runtime.http.api.client.async.ResponseHandler handler)
send in interface org.mule.runtime.http.api.client.HttpClientprotected 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.HttpClientCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.