java.lang.Object | |
↳ | org.apache.http.protocol.HttpRequestExecutor |
Sends HTTP requests and receives the responses. Takes care of request preprocessing and response postprocessing by the respective interceptors.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Create a new request executor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Synchronously send a request and obtain the response.
|
||||||||||
|
Finish a response.
|
||||||||||
|
Prepare a request for sending.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Decide whether a response comes with an entity.
|
||||||||||
|
Wait for and receive a response.
|
||||||||||
|
Send a request over a connection.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Synchronously send a request and obtain the response.
request | the request to send. It will be preprocessed. |
---|---|
conn | the open connection over which to send |
HttpException | in case of a protocol or processing problem |
---|---|
IOException | in case of an I/O problem |
Finish a response. This includes post-processing of the response object. It does not read the response entity, if any. It does not allow for immediate re-use of the connection over which the response is coming in.
response | the response object to finish |
---|---|
processor | the processor to use |
context | the context for post-processing the response |
HttpException | in case of a protocol or processing problem |
---|---|
IOException | in case of an I/O problem |
Prepare a request for sending.
request | the request to prepare |
---|---|
processor | the processor to use |
context | the context for sending the request |
HttpException | in case of a protocol or processing problem |
---|---|
IOException | in case of an I/O problem |
Decide whether a response comes with an entity.
The implementation in this class is based on RFC 2616.
Unknown methods and response codes are supposed to
indicate responses with an entity.
Derived executors can override this method to handle
methods and response codes not specified in RFC 2616.
request | the request, to obtain the executed method |
---|---|
response | the response, to obtain the status code |
Wait for and receive a response. This method will automatically ignore intermediate responses with status code 1xx.
request | the request for which to obtain the response |
---|---|
conn | the connection over which the request was sent |
context | the context for receiving the response |
HttpException | in case of a protocol or processing problem |
---|---|
IOException | in case of an I/O problem |
Send a request over a connection. This method also handles the expect-continue handshake if necessary. If it does not have to handle an expect-continue handshake, it will not use the connection for reading or anything else that depends on data coming in over the connection.
request |
the request to send, already
preprocessed
|
---|---|
conn | the connection over which to send the request, already established |
context | the context for sending the request |
null
if the expect-continue handshake is not used
HttpException | in case of a protocol or processing problem |
---|---|
IOException | in case of an I/O problem |