T - type of the resourcepublic abstract class Reader<T extends Resource> extends Object
| Constructor and Description |
|---|
Reader() |
| Modifier and Type | Method and Description |
|---|---|
Page<T> |
firstPage()
Fetch the first page of resources.
|
abstract Page<T> |
firstPage(TwilioRestClient client)
Fetch the first page of resources using specified client.
|
Long |
getLimit() |
Page<T> |
getPage(String targetUrl)
Retrieve the target page of resources.
|
abstract Page<T> |
getPage(String targetUrl,
TwilioRestClient client)
Retrieve the target page of resources.
|
Integer |
getPageSize() |
Reader<T> |
limit(long limit)
Sets the max number of records to read.
|
Page<T> |
nextPage(Page<T> page)
Fetch the following page of resources.
|
abstract Page<T> |
nextPage(Page<T> page,
TwilioRestClient client)
Fetch the following page of resources using specified client.
|
Reader<T> |
pageSize(int pageSize) |
Page<T> |
previousPage(Page<T> page)
Fetch the prior page of resources.
|
abstract Page<T> |
previousPage(Page<T> page,
TwilioRestClient client)
Fetch the prior page of resources using specified client.
|
ResourceSet<T> |
read()
Execute a request using default client.
|
abstract ResourceSet<T> |
read(TwilioRestClient client)
Execute a request using specified client.
|
com.google.common.util.concurrent.ListenableFuture<ResourceSet<T>> |
readAsync()
Execute an async request using default client.
|
com.google.common.util.concurrent.ListenableFuture<ResourceSet<T>> |
readAsync(TwilioRestClient client)
Execute an async request using specified client.
|
public ResourceSet<T> read()
public abstract ResourceSet<T> read(TwilioRestClient client)
client - client used to make requestpublic com.google.common.util.concurrent.ListenableFuture<ResourceSet<T>> readAsync()
public com.google.common.util.concurrent.ListenableFuture<ResourceSet<T>> readAsync(TwilioRestClient client)
client - client used to make requestpublic Page<T> firstPage()
public abstract Page<T> firstPage(TwilioRestClient client)
client - client used to fetchpublic Page<T> getPage(String targetUrl)
targetUrl - API-generated URL for the requested results pagepublic abstract Page<T> getPage(String targetUrl, TwilioRestClient client)
targetUrl - API-generated URL for the requested results pageclient - client used to fetchpublic Page<T> nextPage(Page<T> page)
page - current page of resourcespublic abstract Page<T> nextPage(Page<T> page, TwilioRestClient client)
page - current page of resourcesclient - client used to fetchpublic Page<T> previousPage(Page<T> page)
page - current page of resourcespublic abstract Page<T> previousPage(Page<T> page, TwilioRestClient client)
page - current page of resourcesclient - client used to fetchpublic Integer getPageSize()
public Long getLimit()
Copyright © 2016 Twilio, Inc. All Rights Reserved.