org.apache.activemq
Class MessageDispatchChannel
java.lang.Object
org.apache.activemq.MessageDispatchChannel
public class MessageDispatchChannel
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MessageDispatchChannel
public MessageDispatchChannel()
enqueue
public void enqueue(MessageDispatch message)
enqueueFirst
public void enqueueFirst(MessageDispatch message)
isEmpty
public boolean isEmpty()
dequeue
public 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
public MessageDispatch dequeueNoWait()
peek
public MessageDispatch peek()
start
public void start()
stop
public void stop()
close
public void close()
clear
public void clear()
isClosed
public boolean isClosed()
size
public int size()
getMutex
public java.lang.Object getMutex()
isRunning
public boolean isRunning()
removeAll
public java.util.List removeAll()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2009 Apache Software Foundation. All Rights Reserved.