-
- All Implemented Interfaces:
-
io.ably.lib.http.HttpCore.ResponseHandler
public class BasePaginatedQuery<T> implements HttpCore.ResponseHandler<BasePaginatedResult<T>>
A paginated query base implementation that can be used sync or asynchronously.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBasePaginatedQuery.ResultRequestWraps a Http.Request
-
Constructor Summary
Constructors Constructor Description BasePaginatedQuery(Http http, String path, Array<Param> headers, Array<Param> params, HttpCore.BodyHandler<T> bodyHandler)Construct a PaginatedQuery BasePaginatedQuery(Http http, String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.BodyHandler<T> bodyHandler)Construct a PaginatedQuery
-
Method Summary
Modifier and Type Method Description BasePaginatedQuery.ResultRequest<T>get()Get the result of the first query Http.Request<BasePaginatedResult<T>>exec(String method)Get the result of the first query BasePaginatedResult<T>handleResponse(HttpCore.Response response, ErrorInfo error)-
-
Constructor Detail
-
BasePaginatedQuery
BasePaginatedQuery(Http http, String path, Array<Param> headers, Array<Param> params, HttpCore.BodyHandler<T> bodyHandler)
Construct a PaginatedQuery- Parameters:
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 queries
-
BasePaginatedQuery
BasePaginatedQuery(Http http, String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.BodyHandler<T> bodyHandler)
Construct a PaginatedQuery- Parameters:
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 queries
-
-
Method Detail
-
get
BasePaginatedQuery.ResultRequest<T> get()
Get the result of the first query
-
exec
Http.Request<BasePaginatedResult<T>> exec(String method)
Get the result of the first query
-
handleResponse
BasePaginatedResult<T> handleResponse(HttpCore.Response response, ErrorInfo error)
-
-
-
-