REQUESTBUILDER
- the type of a builder which can produce requests for a list operationREQUEST
- the type of a request to a list operation. This type must match the type
produced by REQUESTBUILDERRESPONSE
- the type of the response from a list operationpublic class ResponseIterable<REQUESTBUILDER,REQUEST,RESPONSE> extends Object implements Iterable<RESPONSE>
An iterable which can be used to iterate over responses returned from calling a list operation. Since this deals in responses, the returned response objects will contain a collection of results. This iterable will handle calling the service to retrieve more results when required.
Constructor and Description |
---|
ResponseIterable(Supplier<REQUESTBUILDER> requestBuilderSupplier,
Function<RESPONSE,String> nextPageTokenRetrievalFunction,
Function<RequestBuilderAndToken<REQUESTBUILDER>,REQUEST> requestBuilderFunction,
Function<REQUEST,RESPONSE> pageRetrievalFunction)
Creates a new iterable.
|
Modifier and Type | Method and Description |
---|---|
Iterator<RESPONSE> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ResponseIterable(Supplier<REQUESTBUILDER> requestBuilderSupplier, Function<RESPONSE,String> nextPageTokenRetrievalFunction, Function<RequestBuilderAndToken<REQUESTBUILDER>,REQUEST> requestBuilderFunction, Function<REQUEST,RESPONSE> pageRetrievalFunction)
Creates a new iterable.
requestBuilderSupplier
- a supplier which can called to produce a builder object for
requestsnextPageTokenRetrievalFunction
- a function which can extract the next page token from a
response produced by a list operationrequestBuilderFunction
- a function which can build a request for a list operation based
on a builder object and a pagination token to usepageRetrievalFunction
- a function which will call a list operation with a request and
return the response of the callCopyright © 2016–2024. All rights reserved.