public class EnqueueTask<T> extends java.lang.Object implements MessageSource<java.util.function.Function<QueueConnector,org.apache.activemq.artemis.api.core.client.ClientMessage>,T>
| Constructor and Description |
|---|
EnqueueTask(QueueConnector queue,
SinkWriter<T,java.io.OutputStream> serializer)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
send(ChannelMessage<java.util.function.Function<QueueConnector,org.apache.activemq.artemis.api.core.client.ClientMessage>,T> msg)
Inputs data into the channel and returns immediately.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasDataSourceuncheckedSendpublic EnqueueTask(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<java.util.function.Function<QueueConnector,org.apache.activemq.artemis.api.core.client.ClientMessage>,T> msg) throws java.lang.Exception
ChannelSourcesend in interface ChannelSource<ChannelMessage<java.util.function.Function<QueueConnector,org.apache.activemq.artemis.api.core.client.ClientMessage>,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.