public class ScheduleTask<T> extends java.lang.Object implements SchedulingSource<T>
Constructor and Description |
---|
ScheduleTask(QueueConnector queue,
SinkWriter<T,java.io.OutputStream> serializer)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
send(ChannelMessage<FutureTimepoint,T> msg)
Sends the message so that the channel will only deliver it to consumers
at the specified time in the future.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asDataSource
uncheckedSend
public ScheduleTask(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<FutureTimepoint,T> msg) throws java.lang.Exception
send
in interface ChannelSource<ChannelMessage<FutureTimepoint,T>>
msg
- amount of time from now to specify when in the
future the message should be delivered.java.lang.NullPointerException
- if the input is null
.java.lang.Exception
- if the data could not be input into the channel.