public abstract class AbstractMessageQueue extends Object implements MessageQueue
Constructor and Description |
---|
AbstractMessageQueue() |
Modifier and Type | Method and Description |
---|---|
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.
|
Object |
getLock() |
boolean |
isClosed() |
boolean |
isRunning() |
JmsInboundMessageDispatch |
peek()
Return but do not remove the first element in the Message queue.
|
protected abstract JmsInboundMessageDispatch |
peekFirst()
Returns but does not remove the first entry in the implementation queue.
|
protected abstract JmsInboundMessageDispatch |
removeFirst()
Removes and returns the first entry in the implementation queue.
|
void |
start()
Starts the Message Queue.
|
void |
stop()
Stops the Message Queue.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, enqueue, enqueueFirst, isEmpty, removeAll, size
public final JmsInboundMessageDispatch peek()
MessageQueue
peek
in interface MessageQueue
public final JmsInboundMessageDispatch dequeue(long timeout) throws InterruptedException
MessageQueue
dequeue
in interface MessageQueue
timeout
- The amount of time to wait for an entry to be added before returning null.InterruptedException
- if the wait is interrupted.public final JmsInboundMessageDispatch dequeueNoWait()
MessageQueue
dequeueNoWait
in interface MessageQueue
public final void start()
MessageQueue
start
in interface MessageQueue
public final void stop()
MessageQueue
stop
in interface MessageQueue
public final boolean isRunning()
isRunning
in interface MessageQueue
public final void close()
MessageQueue
close
in interface MessageQueue
public final boolean isClosed()
isClosed
in interface MessageQueue
public final Object getLock()
getLock
in interface MessageQueue
protected abstract JmsInboundMessageDispatch removeFirst()
protected abstract JmsInboundMessageDispatch peekFirst()
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.