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

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

Name Description
RequestT
ResponseT
ResourceT

Methods

emptyToken()

public abstract String emptyToken()

Delivers the empty page token.

Returns
Type Description
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
Name Description
payload ResponseT
Returns
Type Description
String

extractPageSize(RequestT payload)

public abstract Integer extractPageSize(RequestT payload)

Extracts the page size setting from the request.

Parameter
Name Description
payload RequestT
Returns
Type Description
Integer

extractResources(ResponseT payload)

public abstract Iterable<ResourceT> extractResources(ResponseT payload)

Extracts an iterable of resources from the response.

Parameter
Name Description
payload ResponseT
Returns
Type Description
Iterable<ResourceT>

injectPageSize(RequestT payload, int pageSize)

public abstract RequestT injectPageSize(RequestT payload, int pageSize)

Injects page size setting into the request.

Parameters
Name Description
payload RequestT
pageSize int
Returns
Type Description
RequestT

injectToken(RequestT payload, String token)

public abstract RequestT injectToken(RequestT payload, String token)

Injects a page token into the request.

Parameters
Name Description
payload RequestT
token String
Returns
Type Description
RequestT