Class ResponseRecordIterable<REQUESTBUILDER,REQUEST,RESPONSE,ITEMTYPE>
- java.lang.Object
-
- com.oracle.bmc.paginator.internal.ResponseRecordIterable<REQUESTBUILDER,REQUEST,RESPONSE,ITEMTYPE>
-
- Type Parameters:
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 operationITEMTYPE
- the type of the model/resource returned inside the response
- All Implemented Interfaces:
Iterable<ITEMTYPE>
public class ResponseRecordIterable<REQUESTBUILDER,REQUEST,RESPONSE,ITEMTYPE> extends Object implements Iterable<ITEMTYPE>
An iterable which can be used to iterate over the models/resources returned by a list operation.These are the items which are contained with the response received from a list operation (e.g. by calling getItems() method on the response object). This iterable will handle calling the service to retrieve more results when required.
-
-
Constructor Summary
Constructors Constructor Description ResponseRecordIterable(Supplier<REQUESTBUILDER> requestBuilderSupplier, Function<RESPONSE,String> nextPageTokenRetrievalFunction, Function<RequestBuilderAndToken<REQUESTBUILDER>,REQUEST> requestBuilderFunction, Function<REQUEST,RESPONSE> pageRetrievalFunction, Function<RESPONSE,List<ITEMTYPE>> retrieveItemsFromResponseFunction)
Creates a new iterable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<ITEMTYPE>
iterator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ResponseRecordIterable
public ResponseRecordIterable(Supplier<REQUESTBUILDER> requestBuilderSupplier, Function<RESPONSE,String> nextPageTokenRetrievalFunction, Function<RequestBuilderAndToken<REQUESTBUILDER>,REQUEST> requestBuilderFunction, Function<REQUEST,RESPONSE> pageRetrievalFunction, Function<RESPONSE,List<ITEMTYPE>> retrieveItemsFromResponseFunction)
Creates a new iterable.- Parameters:
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 call
-
-
Method Detail
-
iterator
public Iterator<ITEMTYPE> iterator()
- Specified by:
iterator
in interfaceIterable<REQUESTBUILDER>
-
-