T - the body response type.public class PaginatedQuery<T> extends java.lang.Object implements Http.ResponseHandler<PaginatedResult<T>>
| Modifier and Type | Class and Description |
|---|---|
class |
PaginatedQuery.ResultPage
A private class encapsulating the result of a single page response
|
| Constructor and Description |
|---|
PaginatedQuery(Http http,
java.lang.String path,
Param[] headers,
Param[] params,
Http.BodyHandler<T> bodyHandler)
Construct a PaginatedQuery
|
| Modifier and Type | Method and Description |
|---|---|
PaginatedResult<T> |
get()
Get the result of the first query
|
PaginatedQuery.ResultPage |
handleResponse(int statusCode,
java.lang.String contentType,
java.util.Collection<java.lang.String> linkHeaders,
byte[] body) |
public PaginatedQuery(Http 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 PaginatedResult<T> get() throws AblyException
AblyExceptionpublic PaginatedQuery.ResultPage handleResponse(int statusCode, java.lang.String contentType, java.util.Collection<java.lang.String> linkHeaders, byte[] body) throws AblyException
handleResponse in interface Http.ResponseHandler<PaginatedResult<T>>AblyException