Package com.complexible.common.base
Interface HandlerBackedIterator.DataProducer<T>
- All Superinterfaces:
Cancellable
- Enclosing class:
HandlerBackedIterator<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface HandlerBackedIterator.DataProducer<T>
extends Cancellable
-
Method Summary
-
Method Details
-
run
Generates data items and pushes it to the handler. Note: this method _must_ stop if the handler throws aHandlerBackedIterator.ProducerFinishederror. That's the prime way to stop iteration before getting all results. -
cancel
Tells the producer that it has been cancelled. Normally is called when the iterator gets a cancellation call on the main thread.- Specified by:
cancelin interfaceCancellable- Parameters:
message- the cause of the cancellation ornullif the cause is unknown
-