public interface HttpRequestExecutor
HttpRequest.
It's worth noting, that the request URI is never determined by the request. All execute methods take a dedicated URI parameter.| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(java.net.URI uri,
HttpRequest<T> request)
Sends the given
HttpRequest to the given URI and returns the result. |
<T> T |
execute(java.net.URI uri,
HttpRequest<T> request,
OnRedirectCallback redirectionCallback)
Sends the given
HttpRequest to the given URI and returns the result. |
<T> void |
execute(java.net.URI uri,
HttpRequest<T> request,
OnResponseCallback<T> callback)
|
<T> void |
execute(java.net.URI uri,
HttpRequest<T> request,
OnResponseCallback<T> callback,
OnRedirectCallback redirectionCallback)
|
<T> T execute(java.net.URI uri,
HttpRequest<T> request)
throws java.io.IOException,
ProtocolError,
ProtocolException,
RedirectionException,
UnexpectedResponseException
HttpRequest to the given URI and returns the result. This method uses the default redirection handling policy as
configured in the executer instance.uri - The URI to send this request to.request - The request to execute.java.io.IOExceptionProtocolErrorProtocolExceptionRedirectionExceptionUnexpectedResponseException<T> T execute(java.net.URI uri,
HttpRequest<T> request,
OnRedirectCallback redirectionCallback)
throws java.io.IOException,
ProtocolError,
ProtocolException,
RedirectionException,
UnexpectedResponseException
HttpRequest to the given URI and returns the result. This method uses a custom OnRedirectCallback to handle any
redirections.uri - The URI to send this request to.request - The request to execute.redirectionCallback - An OnRedirectCallback that determines how to handle any redirections.java.io.IOExceptionProtocolErrorProtocolExceptionRedirectionExceptionUnexpectedResponseException<T> void execute(java.net.URI uri,
HttpRequest<T> request,
OnResponseCallback<T> callback)
HttpRequest to the given URI and calls an OnResponseCallback with the result. This method uses the default
redirection handling policy as configured in the executer instance. This method may be executed asynchronously, so the caller must be aware that the
result may not be available yet, when the method returns.uri - The URI to send this request to.request - The request to execute.callback - An OnResponseCallback to call with the result of the request.<T> void execute(java.net.URI uri,
HttpRequest<T> request,
OnResponseCallback<T> callback,
OnRedirectCallback redirectionCallback)
HttpRequest to the given URI and calls an OnResponseCallback with the result. This method uses a custom
OnRedirectCallback to handle any redirections. This method may be executed asynchronously, so the caller must be aware that the result may not be
available yet, when the method returns.uri - The URI to send this request to.request - The request to execute.callback - An OnResponseCallback to call with the result of the request.redirectionCallback - An OnRedirectCallback that determines how to handle any redirections.