T - AcmeResource type to iterate overpublic class ResourceIterator<T extends AcmeResource> extends Object implements Iterator<T>
Iterator that fetches a batch of URLs from the ACME server, and generates
AcmeResource instances.| Constructor and Description |
|---|
ResourceIterator(Session session,
String field,
URL start,
BiFunction<Session,URL,T> creator)
Creates a new
ResourceIterator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Checks if there is another object in the result.
|
T |
next()
Returns the next object of the result.
|
void |
remove()
Unsupported operation, only here to satisfy the
Iterator interface. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic ResourceIterator(Session session, String field, URL start, BiFunction<Session,URL,T> creator)
ResourceIterator.session - Session to bind this iterator tofield - Field name to be used in the JSON responsestart - URL of the first JSON array, may be null for an empty iteratorcreator - Creator for an AcmeResource that is bound to the given
Session and URL.public boolean hasNext()
hasNext in interface Iterator<T extends AcmeResource>AcmeProtocolException - if the next batch of URLs could not be fetched from the serverpublic T next()
next in interface Iterator<T extends AcmeResource>AcmeProtocolException - if the next batch of URLs could not be fetched from the serverNoSuchElementException - if there are no more entriesCopyright © 2015–2019. All rights reserved.