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
|
AsyncPaginatedQuery(AsyncHttp http,
java.lang.String path,
Param[] headers,
Param[] params,
Http.RequestBody requestBody,
Http.BodyHandler<T> bodyHandler)
Construct a PaginatedQuery
|
| Modifier and Type | Method and Description |
|---|---|
void |
exec(java.lang.String method,
Callback<AsyncPaginatedResult<T>> callback)
Get the result of a query with the current params
|
void |
exec(java.lang.String method,
Param[] params,
Callback<AsyncPaginatedResult<T>> callback)
Get the result of a query with the given params
|
void |
get(Callback<AsyncPaginatedResult<T>> callback)
Get the result of the first query
|
AsyncPaginatedResult<T> |
handleResponse(Http.Response response,
ErrorInfo error) |
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 AsyncPaginatedQuery(AsyncHttp http, java.lang.String path, Param[] headers, Param[] params, Http.RequestBody requestBody, 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 void exec(java.lang.String method,
Callback<AsyncPaginatedResult<T>> callback)
callback. - On success returns A PaginatedResultpublic void exec(java.lang.String method,
Param[] params,
Callback<AsyncPaginatedResult<T>> callback)
callback. - On success returns A PaginatedResultpublic AsyncPaginatedResult<T> handleResponse(Http.Response response, ErrorInfo error) throws AblyException
handleResponse in interface Http.ResponseHandler<AsyncPaginatedResult<T>>AblyException