public class GrizzlyHttpClient extends Object implements HttpClient
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
GrizzlyHttpClient(HttpClientConfiguration config) |
Modifier and Type | Method and Description |
---|---|
protected com.ning.http.client.ProxyServer |
buildProxy(ProxyConfig proxyConfig) |
protected com.ning.http.client.RequestBuilder |
createRequestBuilder(HttpRequest request) |
protected void |
doConfigureProxy(com.ning.http.client.AsyncHttpClientConfig.Builder builder,
ProxyConfig proxyConfig) |
protected ProxyConfig |
getProxyConfig() |
void |
initialise()
Method used to perform any initialisation work.
|
protected void |
populateHeaders(HttpRequest request,
com.ning.http.client.RequestBuilder builder) |
HttpResponse |
send(HttpRequest request,
int responseTimeout,
boolean followRedirects,
HttpRequestAuthentication authentication)
Sends a HttpRequest blocking the current thread until a response is available for the request times out.
|
void |
send(HttpRequest request,
int responseTimeout,
boolean followRedirects,
HttpRequestAuthentication authentication,
CompletionHandler<HttpResponse,Exception> completionHandler,
WorkManager workManager)
Sends a HttpRequest without blocking the current thread.
|
void |
stop() |
public GrizzlyHttpClient(HttpClientConfiguration config)
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered fromprotected void doConfigureProxy(com.ning.http.client.AsyncHttpClientConfig.Builder builder, ProxyConfig proxyConfig)
protected final com.ning.http.client.ProxyServer buildProxy(ProxyConfig proxyConfig)
public HttpResponse send(HttpRequest request, int responseTimeout, boolean followRedirects, HttpRequestAuthentication authentication) throws IOException, TimeoutException
HttpClient
send
in interface HttpClient
IOException
TimeoutException
public void send(HttpRequest request, int responseTimeout, boolean followRedirects, HttpRequestAuthentication authentication, CompletionHandler<HttpResponse,Exception> completionHandler, WorkManager workManager)
HttpClient
send
in interface HttpClient
protected com.ning.http.client.RequestBuilder createRequestBuilder(HttpRequest request)
protected void populateHeaders(HttpRequest request, com.ning.http.client.RequestBuilder builder)
protected ProxyConfig getProxyConfig()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.