org.apache.activemq
Interface MessageDispatchChannel
- All Known Implementing Classes:
- FifoMessageDispatchChannel, SimplePriorityMessageDispatchChannel
public interface MessageDispatchChannel
enqueue
void enqueue(MessageDispatch message)
enqueueFirst
void enqueueFirst(MessageDispatch message)
isEmpty
boolean isEmpty()
dequeue
MessageDispatch dequeue(long timeout)
throws java.lang.InterruptedException
- Used to get an enqueued message. The amount of time this method blocks is
based on the timeout value. - if timeout==-1 then it blocks until a
message is received. - if timeout==0 then it it tries to not block at
all, it returns a message if it is available - if timeout>0 then it
blocks up to timeout amount of time. Expired messages will consumed by
this method.
- Returns:
- null if we timeout or if the consumer is closed.
- Throws:
javax.jms.JMSException
java.lang.InterruptedException
dequeueNoWait
MessageDispatch dequeueNoWait()
peek
MessageDispatch peek()
start
void start()
stop
void stop()
close
void close()
clear
void clear()
isClosed
boolean isClosed()
size
int size()
getMutex
java.lang.Object getMutex()
isRunning
boolean isRunning()
removeAll
java.util.List<MessageDispatch> removeAll()
Copyright © 2005-2012. All Rights Reserved.