|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.protocol.HttpRequestExecutor
Sends HTTP requests and receives the responses. Takes care of request preprocessing and response postprocessing by the respective interceptors.
Constructor Summary | |
HttpRequestExecutor(HttpProcessor proc)
Create a new request executor. |
Method Summary | |
protected boolean |
canResponseHaveBody(HttpRequest request,
HttpResponse response)
Decide whether a response comes with an entity. |
protected void |
doFinishResponse(HttpResponse response,
HttpContext context)
Finish a response. |
protected void |
doPrepareRequest(HttpRequest request,
HttpContext context)
Prepare a request for sending. |
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. |
HttpParams |
getParams()
Obtain the parameters for executing requests. |
void |
setParams(HttpParams params)
Set new parameters for executing requests. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HttpRequestExecutor(HttpProcessor proc)
proc
- the processor to use on requests and responsesMethod Detail |
public final HttpParams getParams()
public final void setParams(HttpParams params)
params
- the new parameters to use from now onprotected boolean canResponseHaveBody(HttpRequest request, HttpResponse response)
request
- the request, to obtain the executed methodresponse
- the response, to obtain the status codepublic HttpResponse execute(HttpRequest request, HttpClientConnection conn, HttpContext context) throws java.io.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
java.io.IOException
- in case of an I/O problemprotected void doPrepareRequest(HttpRequest request, HttpContext context) throws HttpException, java.io.IOException
request
- the request to preparecontext
- the context for sending the request
HttpException
- in case of a protocol or processing problem
java.io.IOException
- in case of an I/O problemprotected HttpResponse doSendRequest(HttpRequest request, HttpClientConnection conn, HttpContext context) throws java.io.IOException, HttpException
request
- the request to send, already
prepared
conn
- 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
java.io.IOException
- in case of an I/O problemprotected HttpResponse doReceiveResponse(HttpRequest request, HttpClientConnection conn, HttpContext context) throws HttpException, java.io.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
java.io.IOException
- in case of an I/O problemprotected void doFinishResponse(HttpResponse response, HttpContext context) throws HttpException, java.io.IOException
response
- the response object to finishcontext
- the context for post-processing the response
HttpException
- in case of a protocol or processing problem
java.io.IOException
- in case of an I/O problem
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |