public class CountedScheduleTask<T> extends java.lang.Object implements MessageSource<CountedSchedule,T>
CountedScheduleSink
Constructor and Description |
---|
CountedScheduleTask(QueueConnector queue,
SinkWriter<T,java.io.OutputStream> serializer)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
send(ChannelMessage<CountedSchedule,T> msg)
Inputs data into the channel and returns immediately.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asDataSource
uncheckedSend
public CountedScheduleTask(QueueConnector queue, SinkWriter<T,java.io.OutputStream> serializer) throws org.apache.activemq.artemis.api.core.ActiveMQException
queue
- provides access to the queue on which to put messages.serializer
- serialises the message data, a T
-value.org.apache.activemq.artemis.api.core.ActiveMQException
- if a queue producer could not be created.java.lang.NullPointerException
- if any argument is null
.public void send(ChannelMessage<CountedSchedule,T> msg) throws java.lang.Exception
ChannelSource
send
in interface ChannelSource<ChannelMessage<CountedSchedule,T>>
msg
- the message to send.java.lang.NullPointerException
- if the input is null
.java.lang.Exception
- if the data could not be input into the channel.