org.apache.activemq
Class MessageDispatchChannel

java.lang.Object
  extended by org.apache.activemq.MessageDispatchChannel

public class MessageDispatchChannel
extends java.lang.Object


Constructor Summary
MessageDispatchChannel()
           
 
Method Summary
 void clear()
           
 void close()
           
 MessageDispatch dequeue(long timeout)
          Used to get an enqueued message.
 MessageDispatch dequeueNoWait()
           
 void enqueue(MessageDispatch message)
           
 void enqueueFirst(MessageDispatch message)
           
 java.lang.Object getMutex()
           
 boolean isClosed()
           
 boolean isEmpty()
           
 boolean isRunning()
           
 MessageDispatch peek()
           
 java.util.List removeAll()
           
 int size()
           
 void start()
           
 void stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageDispatchChannel

public MessageDispatchChannel()
Method Detail

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 © 2010 Apache Software Foundation. All Rights Reserved.