Interface PagedListDescriptor<RequestT,ResponseT,ResourceT> (2.8.1)

public interface PagedListDescriptor<RequestT,ResponseT,ResourceT>

An interface which provides the functionality to extract data from requests and inject data into requests for the purposes of page streaming.

This class is designed to be used by generated code.

Type Parameters

NameDescription
RequestT
ResponseT
ResourceT

Methods

emptyToken()

public abstract String emptyToken()

Delivers the empty page token.

Returns
TypeDescription
String

extractNextToken(ResponseT payload)

public abstract String extractNextToken(ResponseT payload)

Extracts the next token from the response. Returns the empty token if there are no more pages.

Parameter
NameDescription
payloadResponseT
Returns
TypeDescription
String

extractPageSize(RequestT payload)

public abstract Integer extractPageSize(RequestT payload)

Extracts the page size setting from the request.

Parameter
NameDescription
payloadRequestT
Returns
TypeDescription
Integer

extractResources(ResponseT payload)

public abstract Iterable<ResourceT> extractResources(ResponseT payload)

Extracts an iterable of resources from the response.

Parameter
NameDescription
payloadResponseT
Returns
TypeDescription
Iterable<ResourceT>

injectPageSize(RequestT payload, int pageSize)

public abstract RequestT injectPageSize(RequestT payload, int pageSize)

Injects page size setting into the request.

Parameters
NameDescription
payloadRequestT
pageSizeint
Returns
TypeDescription
RequestT

injectToken(RequestT payload, String token)

public abstract RequestT injectToken(RequestT payload, String token)

Injects a page token into the request.

Parameters
NameDescription
payloadRequestT
tokenString
Returns
TypeDescription
RequestT