public class OnceOffRepeatConsumer<T>
extends java.lang.Object
implements java.util.function.Consumer<T>
RepeatAction
s work well when used
for once-off schedules.ReschedulingSink
,
MessageRepeater
,
OnceOffSchedule
Constructor and Description |
---|
OnceOffRepeatConsumer(RepeatConsumer<T> consumer,
java.util.function.Consumer<T> exceededRedeliveryHandler)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(T data) |
public OnceOffRepeatConsumer(RepeatConsumer<T> consumer, java.util.function.Consumer<T> exceededRedeliveryHandler)
consumer
- consumes the message output from the channel and returns
an indication of whether the same message should be delivered again.exceededRedeliveryHandler
- is given the message if the consumer
asks to re-deliver.java.lang.NullPointerException
- if any argument is null
.