Package io.ably.lib.types
Class HttpPaginatedResponse
java.lang.Object
io.ably.lib.types.HttpPaginatedResponse
- Direct Known Subclasses:
HttpPaginatedQuery.HttpPaginatedResult
public abstract class HttpPaginatedResponse
extends java.lang.Object
A superset of
PaginatedResult which represents a page of results plus metadata indicating the relative queries available to it.
HttpPaginatedResponse additionally carries information about the response to an HTTP request.-
Field Summary
Fields Modifier and Type Field Description interrorCodeThe error code if the X-Ably-Errorcode HTTP header is sent in the response.java.lang.StringerrorMessageThe error message if the X-Ably-Errormessage HTTP header is sent in the response.Param[]headersThe headers of the response.intstatusCodeThe HTTP status code of the response.booleansuccessWhether statusCode indicates success. -
Constructor Summary
Constructors Constructor Description HttpPaginatedResponse() -
Method Summary
Modifier and Type Method Description abstract HttpPaginatedResponsecurrent()abstract HttpPaginatedResponsefirst()Perform the given relative queryabstract booleanhasCurrent()abstract booleanhasFirst()abstract booleanhasNext()abstract booleanisLast()abstract com.google.gson.JsonElement[]items()Contains a page of results; for example, an array ofMessageorPresenceMessageobjects for a channel history request.abstract HttpPaginatedResponsenext()
-
Field Details
-
success
public boolean successWhether statusCode indicates success. This is equivalent to 200 <= statusCode < 300.Spec: HP5
-
statusCode
public int statusCodeThe HTTP status code of the response.Spec: HP4
-
errorCode
public int errorCodeThe error code if the X-Ably-Errorcode HTTP header is sent in the response.Spec: HP6
-
errorMessage
public java.lang.String errorMessageThe error message if the X-Ably-Errormessage HTTP header is sent in the response.Spec: HP7
-
headers
The headers of the response.Spec: HP8
-
-
Constructor Details
-
HttpPaginatedResponse
public HttpPaginatedResponse()
-
-
Method Details
-
items
public abstract com.google.gson.JsonElement[] items()Contains a page of results; for example, an array ofMessageorPresenceMessageobjects for a channel history request.Spec: HP3
-
first
Perform the given relative query- Throws:
AblyException
-
current
- Throws:
AblyException
-
next
- Throws:
AblyException
-
hasFirst
public abstract boolean hasFirst() -
hasCurrent
public abstract boolean hasCurrent() -
hasNext
public abstract boolean hasNext() -
isLast
public abstract boolean isLast()
-