HttpRequestExecutor is a client side HTTP protocol handler based
on the blocking (classic) I/O model.
HttpRequestExecutor relies on HttpProcessor to generate
mandatory protocol headers for all outgoing messages and apply common,
cross-cutting message transformations to all incoming and outgoing messages.
Application specific processing can be implemented outside
HttpRequestExecutor once the request has been executed and
a response has been received.
| Modifier and Type | Class and Description |
|---|---|
| public static class | HttpRequestExecutor.Builder
Builder for |
| Modifier and Type | Field and Description |
|---|---|
| private final ConnectionReuseStrategy | |
| public static final Timeout | |
| private final Http1StreamListener | |
| private final Timeout |
| Access | Constructor and Description |
|---|---|
| public | HttpRequestExecutor(final Timeout waitForContinue, final ConnectionReuseStrategy connReuseStrategy, final Http1StreamListener streamListener)
Creates new instance of HttpRequestExecutor. |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static HttpRequestExecutor. | |
| public ClassicHttpResponse | Returns: the response to the request.the request to execute. request, final HttpClientConnection the connection over which to execute the request. conn, final HttpResponseInformationCallback callback to execute upon receipt of information status (1xx).
May be null. informationCallback, final HttpContext the context context)Sends the request and obtain a response. |
| public ClassicHttpResponse | Returns: the response to the request.the request to execute. request, final HttpClientConnection the connection over which to execute the request. conn, final HttpContext the context context)Sends the request and obtain a response. |
| public boolean | Returns: true is the connection can be kept-alive and re-used.current request object. request, final ClassicHttpResponse current response object. response, final HttpClientConnection actual connection. connection, final HttpContext current context. context)Determines whether the connection can be kept alive and is safe to be re-used for subsequent message exchanges. |
| public void | postProcess(final ClassicHttpResponse
the response object to post-process response, final HttpProcessor the processor to use processor, final HttpContext the context for post-processing the response context)Post-processes the given response using the given protocol processor and completes the process of request execution. |
| public void | preProcess(final ClassicHttpRequest
the request to prepare request, final HttpProcessor the processor to use processor, final HttpContext the context for sending the request context)Pre-process the given request using the given protocol processor and initiates the process of request execution. |
| connReuseStrategy | back to summary |
|---|---|
| private final ConnectionReuseStrategy connReuseStrategy | |
| DEFAULT_WAIT_FOR_CONTINUE | back to summary |
|---|---|
| public static final Timeout DEFAULT_WAIT_FOR_CONTINUE | |
| streamListener | back to summary |
|---|---|
| private final Http1StreamListener streamListener | |
| waitForContinue | back to summary |
|---|---|
| private final Timeout waitForContinue | |
| HttpRequestExecutor | back to summary |
|---|---|
| public HttpRequestExecutor(final Timeout waitForContinue, final ConnectionReuseStrategy connReuseStrategy, final Http1StreamListener streamListener) Creates new instance of HttpRequestExecutor.
| |
| HttpRequestExecutor | back to summary |
|---|---|
| public HttpRequestExecutor(final ConnectionReuseStrategy connReuseStrategy) | |
| HttpRequestExecutor | back to summary |
|---|---|
| public HttpRequestExecutor() | |
| builder | back to summary |
|---|---|
| public static HttpRequestExecutor. Create a new
| |
| execute | back to summary |
|---|---|
| public ClassicHttpResponse execute(final ClassicHttpRequest request, final HttpClientConnection conn, final HttpResponseInformationCallback informationCallback, final HttpContext context) throws IOException, HttpException Sends the request and obtain a response.
| |
| execute | back to summary |
|---|---|
| public ClassicHttpResponse execute(final ClassicHttpRequest request, final HttpClientConnection conn, final HttpContext context) throws IOException, HttpException Sends the request and obtain a response.
| |
| keepAlive | back to summary |
|---|---|
| public boolean keepAlive(final ClassicHttpRequest request, final ClassicHttpResponse response, final HttpClientConnection connection, final HttpContext context) throws IOException Determines whether the connection can be kept alive and is safe to be re-used for subsequent message exchanges.
| |
| postProcess | back to summary |
|---|---|
| public void postProcess(final ClassicHttpResponse response, final HttpProcessor processor, final HttpContext context) throws HttpException, IOException Post-processes the given response using the given protocol processor and completes the process of request execution. This method does not read the response entity, if any. The connection over which content of the response entity is being streamed from cannot be reused until the response entity has been fully consumed.
| |
| preProcess | back to summary |
|---|---|
| public void preProcess(final ClassicHttpRequest request, final HttpProcessor processor, final HttpContext context) throws HttpException, IOException Pre-process the given request using the given protocol processor and initiates the process of request execution.
| |
HttpRequestExecutor.
| Modifier and Type | Field and Description |
|---|---|
| private ConnectionReuseStrategy | |
| private Http1StreamListener | |
| private Timeout |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public HttpRequestExecutor | |
| public HttpRequestExecutor. | |
| public HttpRequestExecutor. | |
| public HttpRequestExecutor. |
| connReuseStrategy | back to summary |
|---|---|
| private ConnectionReuseStrategy connReuseStrategy | |
| streamListener | back to summary |
|---|---|
| private Http1StreamListener streamListener | |
| waitForContinue | back to summary |
|---|---|
| private Timeout waitForContinue | |
| Builder | back to summary |
|---|---|
| private Builder() | |
| build | back to summary |
|---|---|
| public HttpRequestExecutor build() Create a new HTTP Request Executor.
| |
| withConnectionReuseStrategy | back to summary |
|---|---|
| public HttpRequestExecutor. | |
| withHttp1StreamListener | back to summary |
|---|---|
| public HttpRequestExecutor. | |
| withWaitForContinue | back to summary |
|---|---|
| public HttpRequestExecutor. | |