public class ReschedulingSink<T> extends java.lang.Object implements MessageSink<CountedSchedule,T>
Constructor and Description |
---|
ReschedulingSink(Reschedulable<T> task,
MessageSource<CountedSchedule,T> loopback)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
consume(ChannelMessage<CountedSchedule,T> msg)
Consumes a message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asDataSink, forwardDataTo
public ReschedulingSink(Reschedulable<T> task, MessageSource<CountedSchedule,T> loopback)
task
- consumes the channel output and optionally produces more
data to input into the channel with an indication of when the data
should be delivered to channel's sinks.loopback
- where to put data (if any) produced by the task; normally
this would be the same channel this sink is bound to, i.e. the same
channel from which the data was received.java.lang.NullPointerException
- if any argument is null
.public void consume(ChannelMessage<CountedSchedule,T> msg)
ChannelSink
consume
in interface ChannelSink<ChannelMessage<CountedSchedule,T>>
msg
- the message data output from the channel.