Interface VirtualGenerator<T>
- Type Parameters:
T- the element type generated
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface to implement to produce elements when asked by
.
invalid reference
Flowable#virtaulCreate(VirtualGenerator, java.util.concurrent.ExecutorService)
To signal onComplete, return normally from generate(VirtualEmitter).
To signal onError, throw any exception from generate(VirtualEmitter).
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate(VirtualEmitter<T> emitter) The method to implement and start emitting items.
-
Method Details
-
generate
The method to implement and start emitting items.- Parameters:
emitter- useVirtualEmitter.emit(Object)to generate values- Throws:
Throwable- if the generator wishes to signalonError.
-