public class CountedScheduleSink<T> extends java.lang.Object implements MessageSink<org.apache.activemq.artemis.api.core.client.ClientMessage,T>
DequeueTask
consumer to convert raw Artemis metadata into a
CountedSchedule
and forward it, along with the received data
T
to a target message sink.CountedScheduleTask
Constructor and Description |
---|
CountedScheduleSink(MessageSink<CountedSchedule,T> consumer)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
consume(ChannelMessage<org.apache.activemq.artemis.api.core.client.ClientMessage,T> queued)
Consumes a message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asDataSink, forwardDataTo
public CountedScheduleSink(MessageSink<CountedSchedule,T> consumer)
consumer
- the target sink to consume the metadata and data
extracted from queued messages.java.lang.NullPointerException
- if the argument is null
.public void consume(ChannelMessage<org.apache.activemq.artemis.api.core.client.ClientMessage,T> queued)
ChannelSink
consume
in interface ChannelSink<ChannelMessage<org.apache.activemq.artemis.api.core.client.ClientMessage,T>>
queued
- the message data output from the channel.