public class Page<T> extends Response implements TypedResponse<Page<T>>
Modifier and Type | Class and Description |
---|---|
static class |
Page.Links
Links connected to page response.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Page.Links |
getLinks() |
Page<T> |
getNextPage(okhttp3.OkHttpClient httpClient) |
java.util.List<T> |
getRecords() |
com.google.gson.reflect.TypeToken<Page<T>> |
getType() |
int |
hashCode() |
void |
setType(com.google.gson.reflect.TypeToken<Page<T>> type) |
public Page<T> getNextPage(okhttp3.OkHttpClient httpClient)
NetworkException
- All the exceptions below are subclasses of
NetworkErrorBadRequestException
- if the request fails due to a bad request
(4xx)BadResponseException
- if the request fails due to a bad
response from the server (5xx)TooManyRequestsException
- if the request fails due to too many
requests sent to the serverRequestTimeoutException
- When Horizon returns a Timeout
or connection timeout occurredUnknownResponseException
- if the server returns an unknown
status codeConnectionErrorException
- When the request cannot be executed
due to cancellation or connectivity problems, etc.public void setType(com.google.gson.reflect.TypeToken<Page<T>> type)
setType
in interface TypedResponse<Page<T>>
public java.util.List<T> getRecords()
public Page.Links getLinks()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object