public interface MessageQueue
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the Queue of any Messages.
|
void |
close()
Closes the Message Queue.
|
JmsInboundMessageDispatch |
dequeue(long timeout)
Used to get an enqueued message.
|
JmsInboundMessageDispatch |
dequeueNoWait()
Used to get an enqueued Message if on exists, otherwise returns null.
|
void |
enqueue(JmsInboundMessageDispatch envelope)
Adds the given message envelope to the end of the Message queue.
|
void |
enqueueFirst(JmsInboundMessageDispatch envelope)
Adds the given message envelope to the front of the Message queue.
|
Object |
getLock() |
boolean |
isClosed() |
boolean |
isEmpty() |
boolean |
isRunning() |
JmsInboundMessageDispatch |
peek()
Return but do not remove the first element in the Message queue.
|
List<JmsInboundMessageDispatch> |
removeAll()
Removes and returns all Messages in the Queue.
|
int |
size()
Returns the number of Messages currently in the Queue.
|
void |
start()
Starts the Message Queue.
|
void |
stop()
Stops the Message Queue.
|
void enqueue(JmsInboundMessageDispatch envelope)
envelope
- The in-bound Message envelope to enqueue.void enqueueFirst(JmsInboundMessageDispatch envelope)
envelope
- The in-bound Message envelope to enqueue.boolean isEmpty()
JmsInboundMessageDispatch peek()
JmsInboundMessageDispatch dequeue(long timeout) throws InterruptedException
timeout
- The amount of time to wait for an entry to be added before returning null.InterruptedException
- if the wait is interrupted.JmsInboundMessageDispatch dequeueNoWait()
void start()
void stop()
boolean isRunning()
void close()
boolean isClosed()
int size()
void clear()
List<JmsInboundMessageDispatch> removeAll()
Object getLock()
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.