public class EventsPageIterator extends Object implements PageIterator<Events>
DEFAULT_PAGE_NUMBER, DEFAULT_PAGE_SIZE
Modifier and Type | Method and Description |
---|---|
static EventsPageIterator |
getInstance(EventsClient eventClient)
Returns an EventsPageIterator instance initialized with the eventClient
|
static EventsPageIterator |
getInstance(EventsClient eventClient,
Integer pageSize)
Returns an EventsPageIterator instance initialized with the eventClient
|
static EventsPageIterator |
getInstance(EventsClient eventClient,
Integer pageSize,
Integer pageNumber)
Returns an EventsPageIterator instance initialized with the eventClient
|
static EventsPageIterator |
getInstance(EventsClient eventClient,
Integer pageSize,
Integer pageNumber,
String filter)
Returns an EventsPageIterator instance initialized with the eventClient
|
Events |
getPage(int pageNumber)
Returns the Events at a requested page number
|
Events |
next()
Returns the next page of Events
|
Events |
previous()
Returns the previous page of Events
|
public static EventsPageIterator getInstance(EventsClient eventClient) throws MindsphereClientException
eventClient
- eventClient that will be used to make API calls to fetch the eventsMindsphereClientException
- thrown if an error occurs while creating an instancepublic static EventsPageIterator getInstance(EventsClient eventClient, Integer pageSize) throws MindsphereClientException
eventClient
- eventClient that will be used to make API calls to fetch the eventspageSize
- number of records that should be available in each page. Default is 2000MindsphereClientException
- thrown if an error occurs while creating an instance with invalid page sizepublic static EventsPageIterator getInstance(EventsClient eventClient, Integer pageSize, Integer pageNumber) throws MindsphereClientException
eventClient
- eventClient that will be used to make API calls to fetch the eventspageSize
- number of records that should be available in each page. Default is 2000pageNumber
- Page number to be fetched. Default is -1MindsphereClientException
- thrown if an error occurs while creating an instance with invalid page sizepublic static EventsPageIterator getInstance(EventsClient eventClient, Integer pageSize, Integer pageNumber, String filter) throws MindsphereClientException
eventClient
- eventClient that will be used to make API calls to fetch the eventspageSize
- number of records that should be available in each page. Default is 2000pageNumber
- Page number to be fetched. Default is -1filter
- filterMindsphereClientException
- thrown if an error occurs while creating an instance with invalid page sizepublic Events next() throws MindsphereException
next
in interface PageIterator<Events>
MindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic Events previous() throws MindsphereException
previous
in interface PageIterator<Events>
MindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic Events getPage(int pageNumber) throws MindsphereException
getPage
in interface PageIterator<Events>
MindsphereException
- thrown if an error occurs while attempting to invoke the API