com.caucho.jms.queue
Interface MessageQueue<E>

All Known Implementing Classes:
AbstractMemoryQueue, AbstractQueue, ClusterQueue, ClusterQueueImpl, FileQueue, FileQueue, FileQueueImpl, FileSubscriberQueue, JdbcQueue, MemoryQueue, MemoryQueue, MemoryQueueImpl, MemorySubscriberQueue, PollingQueue, TemporaryQueueImpl

public interface MessageQueue<E>

Provides abstract API for a queue.


Method Summary
 void acknowledge(java.lang.String msgId)
          Acknowledges the receipt of a message
 void addMessageCallback(MessageCallback<E> messageCallback, boolean isAutoAck)
          Registers a message callback with the queue.
 E receive(long expireTime, boolean isAutoAck)
          Synchronous/blocking message receiving.
 QueueEntry<E> receiveEntry(long expireTime, boolean isAutoAck)
          Synchronous/blocking message receiving.
 void removeMessageCallback(MessageCallback<E> entryCallback)
          Removes the callback when messages are done listening
 void rollback(java.lang.String msgId)
          Rollback a message read
 void send(java.lang.String msgId, E msg, int priority, long expireTime, java.lang.String publisherId)
          Sends a message to the destination
 

Method Detail

send

void send(java.lang.String msgId,
          E msg,
          int priority,
          long expireTime,
          java.lang.String publisherId)
          throws MessageException
Sends a message to the destination

Throws:
MessageException

receiveEntry

QueueEntry<E> receiveEntry(long expireTime,
                           boolean isAutoAck)
                           throws MessageException
Synchronous/blocking message receiving. Listen for a message from the queue, until a message is received or the timeout occurs.

Throws:
MessageException

receive

E receive(long expireTime,
          boolean isAutoAck)
          throws MessageException
Synchronous/blocking message receiving. Listen for a message from the queue, until a message is received or the time expires occurs.

Throws:
MessageException

addMessageCallback

void addMessageCallback(MessageCallback<E> messageCallback,
                        boolean isAutoAck)
                        throws MessageException
Registers a message callback with the queue. Each message callback will receive messages one at a time until the messages complete.

Throws:
MessageException

removeMessageCallback

void removeMessageCallback(MessageCallback<E> entryCallback)
Removes the callback when messages are done listening


rollback

void rollback(java.lang.String msgId)
Rollback a message read


acknowledge

void acknowledge(java.lang.String msgId)
Acknowledges the receipt of a message