| Modifier and Type | Field and Description |
|---|---|
| protected RESPONSE | currentResponse
The most recent response/result of calling the list operation. |
| protected String | nextPageToken
The page token to use on the next request to the list operation |
| protected final Function | nextPageTokenRetrievalFunction
A function which can be used to extract the next page token from a response from a list operation |
| protected final Function | pageRetrievalFunction
A function which can call a list operation with a request and return the response from that call |
| protected final REQUESTBUILDER | requestBuilder
A builder which can be used to construct requests to the list operation |
| protected final Function | requestBuilderFunction
A function which constructs a request to a list operation based on a builder object and pagination token |
| Access | Constructor and Description |
|---|---|
| public | AbstractResponseIterator(final REQUESTBUILDER
a builder object which can create requests for a list operation requestBuilder, final Function<RESPONSE, String> a function which can extract the next page token from a
response produced by a list operation nextPageTokenRetrievalFunction, final Function<RequestBuilderAndToken<REQUESTBUILDER>, REQUEST> a function which can build a request for a list operation based
on a builder object and a pagination token to use requestBuilderFunction, final Function<REQUEST, RESPONSE> a function which will call a list operation with a request and
return the response of the call pageRetrievalFunction)Constructs a new AbstractResponseIterator. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected Optional | Returns: null if we have not previously made a request to fetch any results. Otherwise, an Optional containing the next page token to use. If there is no next page token to use then an empty/absent Optional will be returnedGets the page token that should be used when the list operation is next called. |
| protected REQUEST | Returns: the next request that should be used when calling the list operationBased on the state of this class, produces the next request that should be used when calling the list operation so that the next page of results will be returned. |
| currentResponse | back to summary |
|---|---|
| protected RESPONSE currentResponse The most recent response/result of calling the list operation. If the operation has never been called, then this will be null | |
| nextPageToken | back to summary |
|---|---|
| protected String nextPageToken The page token to use on the next request to the list operation | |
| nextPageTokenRetrievalFunction | back to summary |
|---|---|
| protected final Function<RESPONSE, String> nextPageTokenRetrievalFunction A function which can be used to extract the next page token from a response from a list operation | |
| pageRetrievalFunction | back to summary |
|---|---|
| protected final Function<REQUEST, RESPONSE> pageRetrievalFunction A function which can call a list operation with a request and return the response from that call | |
| requestBuilder | back to summary |
|---|---|
| protected final REQUESTBUILDER requestBuilder A builder which can be used to construct requests to the list operation | |
| requestBuilderFunction | back to summary |
|---|---|
| protected final Function<RequestBuilderAndToken<REQUESTBUILDER>, REQUEST> requestBuilderFunction A function which constructs a request to a list operation based on a builder object and pagination token | |
| AbstractResponseIterator | back to summary |
|---|---|
| public AbstractResponseIterator(final REQUESTBUILDER requestBuilder, final Function<RESPONSE, String> nextPageTokenRetrievalFunction, final Function<RequestBuilderAndToken<REQUESTBUILDER>, REQUEST> requestBuilderFunction, final Function<REQUEST, RESPONSE> pageRetrievalFunction) Constructs a new AbstractResponseIterator.
| |
| fetchNextPage | back to summary |
|---|---|
| protected void fetchNextPage() Updates the state of this class with the next page of results | |
| getNextPageToken | back to summary |
|---|---|
| protected Optional Gets the page token that should be used when the list operation is next called. | |
| getNextRequest | back to summary |
|---|---|
| protected REQUEST getNextRequest() Based on the state of this class, produces the next request that should be used when calling the list operation so that the next page of results will be returned. This will just create the request and not make any service calls
| |