|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.protocol.HttpRequestExecutor
public class HttpRequestExecutor
Sends HTTP requests and receives the responses. Takes care of request preprocessing and response postprocessing by the respective interceptors.
| Constructor Summary | |
|---|---|
HttpRequestExecutor()
Create a new request executor. |
|
| Method Summary | |
|---|---|
protected boolean |
canResponseHaveBody(HttpRequest request,
HttpResponse response)
Decide whether a response comes with an entity. |
protected HttpResponse |
doReceiveResponse(HttpRequest request,
HttpClientConnection conn,
HttpContext context)
Wait for and receive a response. |
protected HttpResponse |
doSendRequest(HttpRequest request,
HttpClientConnection conn,
HttpContext context)
Send a request over a connection. |
HttpResponse |
execute(HttpRequest request,
HttpClientConnection conn,
HttpContext context)
Synchronously send a request and obtain the response. |
void |
postProcess(HttpResponse response,
HttpProcessor processor,
HttpContext context)
Finish a response. |
void |
preProcess(HttpRequest request,
HttpProcessor processor,
HttpContext context)
Prepare a request for sending. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpRequestExecutor()
| Method Detail |
|---|
protected boolean canResponseHaveBody(HttpRequest request,
HttpResponse response)
request - the request, to obtain the executed methodresponse - the response, to obtain the status code
public HttpResponse execute(HttpRequest request,
HttpClientConnection conn,
HttpContext context)
throws IOException,
HttpException
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
public void preProcess(HttpRequest request,
HttpProcessor processor,
HttpContext context)
throws HttpException,
IOException
request - the request to prepareprocessor - the processor to usecontext - the context for sending the request
HttpException - in case of a protocol or processing problem
IOException - in case of an I/O problem
protected HttpResponse doSendRequest(HttpRequest request,
HttpClientConnection conn,
HttpContext context)
throws IOException,
HttpException
request - the request to send, already
preprocessedconn - the connection over which to send the request,
already establishedcontext - 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
protected HttpResponse doReceiveResponse(HttpRequest request,
HttpClientConnection conn,
HttpContext context)
throws HttpException,
IOException
request - the request for which to obtain the responseconn - the connection over which the request was sentcontext - the context for receiving the response
HttpException - in case of a protocol or processing problem
IOException - in case of an I/O problem
public void postProcess(HttpResponse response,
HttpProcessor processor,
HttpContext context)
throws HttpException,
IOException
response - the response object to finishprocessor - the processor to usecontext - the context for post-processing the response
HttpException - in case of a protocol or processing problem
IOException - in case of an I/O problem
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||