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.ObjectA superset ofPaginatedResultwhich 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
All Methods Instance Methods Abstract Methods 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 Detail
-
success
public boolean success
Whether statusCode indicates success. This is equivalent to 200 <= statusCode < 300.Spec: HP5
-
statusCode
public int statusCode
The HTTP status code of the response.Spec: HP4
-
errorCode
public int errorCode
The error code if the X-Ably-Errorcode HTTP header is sent in the response.Spec: HP6
-
errorMessage
public java.lang.String errorMessage
The error message if the X-Ably-Errormessage HTTP header is sent in the response.Spec: HP7
-
headers
public Param[] headers
The headers of the response.Spec: HP8
-
-
Method Detail
-
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
public abstract HttpPaginatedResponse first() throws AblyException
Perform the given relative query- Throws:
AblyException
-
current
public abstract HttpPaginatedResponse current() throws AblyException
- Throws:
AblyException
-
next
public abstract HttpPaginatedResponse next() throws AblyException
- Throws:
AblyException
-
hasFirst
public abstract boolean hasFirst()
-
hasCurrent
public abstract boolean hasCurrent()
-
hasNext
public abstract boolean hasNext()
-
isLast
public abstract boolean isLast()
-
-