Package io.activej.async.function
Interface AsyncConsumer<T>
- All Superinterfaces:
AsyncConsumerEx<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents an asynchronous consumer that consumes data items.
-
Method Summary
Modifier and TypeMethodDescriptionConsumes some data asynchronously.static <T> AsyncConsumer<T>of(io.activej.common.function.ConsumerEx<? super T> consumer) Wraps aConsumerExinterface.static <T> AsyncConsumer<T>sanitize(AsyncConsumerEx<? super T> consumer)
-
Method Details
-
accept
Consumes some data asynchronously.- Specified by:
acceptin interfaceAsyncConsumerEx<T>- Parameters:
value- value to be consumed- Returns:
PromiseofVoidthat represents successful consumption of data
-
of
Wraps aConsumerExinterface.- Parameters:
consumer- aConsumerEx- Returns:
AsyncConsumerthat works on top ofConsumerExinterface
-
sanitize
-