Package io.ably.lib.types
Class HttpPaginatedResponse
java.lang.Object
io.ably.lib.types.HttpPaginatedResponse
- Direct Known Subclasses:
HttpPaginatedQuery.HttpPaginatedResult
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
FieldsModifier and TypeFieldDescriptionint
The error code if the X-Ably-Errorcode HTTP header is sent in the response.The error message if the X-Ably-Errormessage HTTP header is sent in the response.Param[]
The headers of the response.int
The HTTP status code of the response.boolean
Whether statusCode indicates success. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract HttpPaginatedResponse
current()
abstract HttpPaginatedResponse
first()
Perform the given relative queryabstract boolean
abstract boolean
hasFirst()
abstract boolean
hasNext()
abstract boolean
isLast()
abstract com.google.gson.JsonElement[]
items()
Contains a page of results; for example, an array ofMessage
orPresenceMessage
objects for a channel history request.abstract HttpPaginatedResponse
next()
-
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
The 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 ofMessage
orPresenceMessage
objects 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()
-