T - type of object consumedpublic interface Consumer<T>
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(CancelException event)
Cancel and stop consumption.
|
AsyncSupplier<?,? extends Exception> |
consume(T product)
Consume the given object.
|
AsyncSupplier<?,? extends Exception> |
endOfProduction()
Signal the end of production, meaning no new object will be given to consume.
|
void |
error(Exception error)
Signal an error and stop consumption.
|
AsyncSupplier<?,? extends Exception> consume(T product)
AsyncSupplier<?,? extends Exception> endOfProduction()
void error(Exception error)
void cancel(CancelException event)
Copyright © 2019. All rights reserved.