|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsyncHttpProvider
Interface to be used when implementing custom asynchronous I/O HTTP client.
By default, the NettyAsyncHttpProvider
is used.
Method Summary | ||
---|---|---|
void |
close()
Close the current underlying TCP/HTTP connection. |
|
|
execute(Request request,
AsyncHandler<T> handler)
Execute the request and invoke the AsyncHandler when the response arrive. |
|
Response |
prepareResponse(HttpResponseStatus status,
HttpResponseHeaders headers,
Collection<HttpResponseBodyPart> bodyParts)
Prepare a Response |
Method Detail |
---|
<T> ListenableFuture<T> execute(Request request, AsyncHandler<T> handler) throws IOException
AsyncHandler
when the response arrive.
handler
- an instance of AsyncHandler
ListenableFuture
of Type T.
IOException
void close()
Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, Collection<HttpResponseBodyPart> bodyParts)
Response
status
- HttpResponseStatus
headers
- HttpResponseHeaders
bodyParts
- list of HttpResponseBodyPart
Response
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |