JobQueryResponse Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.service.query.JobQueryResponse

public class JobQueryResponse

A pageable set of ScheduledJob objects returned from a query.

Method Summary

Modifier and Type Method and Description
boolean hasNext()
ScheduledJob next()

Return the next job from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the default paging options.

ScheduledJob next(QueryPageOptions pageOptions)

Return the next job from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the provided paging options.

Method Details

hasNext

public boolean hasNext()

Returns:

True if the query has at least one more job to return. False otherwise.

next

public ScheduledJob next()

Return the next job from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the default paging options.

Returns:

the next job from the query.

Throws:

IotHubException - If any IoT Hub level errors occur such as an IotHubUnauthorizedException.
IOException - If any network level errors occur.
NoSuchElementException - If there is no next ScheduledJob to return anymore.

next

public ScheduledJob next(QueryPageOptions pageOptions)

Return the next job from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the provided paging options.

Parameters:

pageOptions - the options for the next page of results if the next page is retrieved to fulfil this request for the next job. May not be null.

Returns:

the next job from the query.

Throws:

IotHubException - If any IoT Hub level errors occur such as an IotHubUnauthorizedException.
IOException - If any network level errors occur.
NoSuchElementException - If there is no next ScheduledJob to return anymore.

Applies to