T - the body response type.public class AsyncPaginatedQuery<T> extends java.lang.Object implements Http.ResponseHandler<AsyncPaginatedResult<T>>
| Modifier and Type | Class and Description |
|---|---|
class |
AsyncPaginatedQuery.ResultPage
A private class encapsulating the result of a single page response
|
| Constructor and Description |
|---|
AsyncPaginatedQuery(AsyncHttp http,
java.lang.String path,
Param[] headers,
Param[] params,
Http.BodyHandler<T> bodyHandler)
Construct a PaginatedQuery
|
| Modifier and Type | Method and Description |
|---|---|
void |
get(Callback<AsyncPaginatedResult<T>> callback)
Get the result of the first query
|
AsyncPaginatedQuery.ResultPage |
handleResponse(int statusCode,
java.lang.String contentType,
java.util.Collection<java.lang.String> linkHeaders,
byte[] body) |
public AsyncPaginatedQuery(AsyncHttp http, java.lang.String path, Param[] headers, Param[] params, Http.BodyHandler<T> bodyHandler)
http. - the http instancepath. - the path of the resource being queriedheaders. - headers to pass into the first and all relative queriesparams. - params to pass into the initial querybodyHandler. - handler to parse response bodies for first and all relative queriespublic void get(Callback<AsyncPaginatedResult<T>> callback)
callback. - On success returns A PaginatedResultpublic AsyncPaginatedQuery.ResultPage handleResponse(int statusCode, java.lang.String contentType, java.util.Collection<java.lang.String> linkHeaders, byte[] body) throws AblyException
handleResponse in interface Http.ResponseHandler<AsyncPaginatedResult<T>>AblyException