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
|
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.regex.Pattern |
linkPattern
internal
|
protected static java.util.regex.Pattern |
urlPattern |
| Constructor and Description |
|---|
PaginatedQuery(Http http,
java.lang.String path,
Param[] headers,
Param[] params,
Http.BodyHandler<T> bodyHandler)
Construct a PaginatedQuery
|
PaginatedQuery(Http 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 |
|---|---|
PaginatedResult<T> |
exec(java.lang.String method)
Get the result of the first query
|
PaginatedResult<T> |
get()
Get the result of the first query
|
PaginatedResult<T> |
handleResponse(Http.Response response,
ErrorInfo error) |
protected static java.util.HashMap<java.lang.String,java.lang.String> |
parseLinks(java.util.Collection<java.lang.String> linkHeaders) |
protected static java.util.regex.Pattern linkPattern
protected static java.util.regex.Pattern urlPattern
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 PaginatedQuery(Http 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 PaginatedResult<T> get() throws AblyException
AblyExceptionpublic PaginatedResult<T> exec(java.lang.String method) throws AblyException
AblyExceptionpublic PaginatedResult<T> handleResponse(Http.Response response, ErrorInfo error) throws AblyException
handleResponse in interface Http.ResponseHandler<PaginatedResult<T>>AblyExceptionprotected static java.util.HashMap<java.lang.String,java.lang.String> parseLinks(java.util.Collection<java.lang.String> linkHeaders)