|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
HTTP request execution handler can be used by client-side protocol handlers to trigger the submission of a new HTTP request and the processing of an HTTP response.
| Method Summary | |
void |
handleResponse(org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
Triggered when an HTTP response is ready to be processed. |
void |
initalizeContext(org.apache.http.protocol.HttpContext context,
java.lang.Object attachment)
Triggered when a new connection has been established and the HTTP context needs to be initialized. |
org.apache.http.HttpRequest |
submitRequest(org.apache.http.protocol.HttpContext context)
Triggered when the underlying connection is ready to send a new HTTP request to the target host. |
| Method Detail |
public void initalizeContext(org.apache.http.protocol.HttpContext context,
java.lang.Object attachment)
The attachment object is the same object which was passed to the connecting I/O reactor when the connection request was made. The attachment may optionally contain some state information required in order to correctly initalize the HTTP context.
context - the actual HTTP contextattachment - the object passed to the connecting I/O reactor
upon the request for a new connection.ConnectingIOReactor#connect(java.net.SocketAddress, java.net.SocketAddress, Object)public org.apache.http.HttpRequest submitRequest(org.apache.http.protocol.HttpContext context)
null if the client is not yet ready to send a
request. In this case the connection will remain open and
can be activated at a later point.
- Parameters:
context - the actual HTTP context
- Returns:
- an HTTP request to be sent or
null if no
request needs to be sent
public void handleResponse(org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
response - the HTTP response to be processedcontext - the actual HTTP context
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||