public interface ApiRequest
Modifier and Type | Field and Description |
---|---|
static long |
ASYNCHRONOUS_ASYNC_AFTER_VALUE |
static long |
SYNCHRONOUS_ASYNC_AFTER_VALUE |
Modifier and Type | Method and Description |
---|---|
default org.joda.time.format.DateTimeFormatter |
generateDateTimeFormatter(org.joda.time.DateTimeZone timeZone)
Get the DateTimeFormatter shifted to the given time zone.
|
long |
getAsyncAfter()
Returns how long the user is willing to wait before a request should go asynchronous.
|
javax.ws.rs.core.Response.ResponseBuilder |
getBuilder()
Get the response builder associated with this request.
|
PaginationParameters |
getDefaultPagination()
Get the default pagination parameters for this type of API request.
|
ResponseFormatType |
getFormat()
Get the type of the requested response format.
|
<T> Stream<T> |
getPage(Collection<T> data)
Deprecated.
Pagination is moving to a Stream and pushing creation of the page to a more general
method (
getPage(Pagination) ) to allow for more flexibility
in how pagination is done. |
<T> Stream<T> |
getPage(Pagination<T> pagination)
Add links to the response builder and return a stream with the requested page from the raw data.
|
Pagination<?> |
getPagination()
Get the pagination object associated with this request.
|
Optional<PaginationParameters> |
getPaginationParameters()
Get the requested pagination parameters.
|
javax.ws.rs.core.UriInfo |
getUriInfo()
Get the uri info.
|
static final long SYNCHRONOUS_ASYNC_AFTER_VALUE
static final long ASYNCHRONOUS_ASYNC_AFTER_VALUE
default org.joda.time.format.DateTimeFormatter generateDateTimeFormatter(org.joda.time.DateTimeZone timeZone)
timeZone
- TimeZone to shift the default formatter toResponseFormatType getFormat()
Optional<PaginationParameters> getPaginationParameters()
javax.ws.rs.core.UriInfo getUriInfo()
Pagination<?> getPagination()
getPage(java.util.Collection<T>)
long getAsyncAfter()
javax.ws.rs.core.Response.ResponseBuilder getBuilder()
PaginationParameters getDefaultPagination()
@Deprecated <T> Stream<T> getPage(Collection<T> data)
getPage(Pagination)
) to allow for more flexibility
in how pagination is done.T
- The type of the collection elementsdata
- The data to be paginated.<T> Stream<T> getPage(Pagination<T> pagination)
T
- The type of the collection elementspagination
- The pagination objectCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.