Class ClientUriSuppliers.RandomSupplier
java.lang.Object
io.helidon.webclient.grpc.ClientUriSuppliers.RandomSupplier
- All Implemented Interfaces:
ClientUriSupplier, Iterable<ClientUri>, Iterator<ClientUri>
- Enclosing class:
ClientUriSuppliers
Supplies an iterator that returns a URI chosen at random, never ends.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRandomSupplier(ClientUri[] clientUris) Creates a random supplier. -
Method Summary
Modifier and TypeMethodDescriptionCreates a random supplier.create(Collection<ClientUri> clientUris) Creates a random supplier.booleanhasNext()next()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClientUriSupplier
iteratorMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Iterator
forEachRemaining, remove
-
Constructor Details
-
RandomSupplier
Creates a random supplier.- Parameters:
clientUris- URI to cycle through in a random order
-
-
Method Details
-
create
Creates a random supplier.- Parameters:
clientUris- array of client URIs- Returns:
- new supplier
-
create
Creates a random supplier.- Parameters:
clientUris- collection of client URIs- Returns:
- new supplier
-
hasNext
-
next
-