org.activemq.service
Interface QueueMessageContainer

All Superinterfaces:
MessageContainer, Service
All Known Implementing Classes:
DurableQueueMessageContainer

public interface QueueMessageContainer
extends MessageContainer

A Queue based MessageContainer

Version:
$Revision: 1.1.1.1 $

Method Summary
 ActiveMQMessage peekNext(MessageIdentity messageIdentity)
          Used for browsing a MessageContainer this returns the next message in the container after the messageId
 ActiveMQMessage poll()
          Some implementations may need to poll to fill subscriptions this returns the next message in the container
 void recoverMessageToBeDelivered(MessageIdentity messageIdentity)
          Invoked during the recovery to add the given message to the end of the messages to be delivered.
 void reset()
          called to reset dispatch pointers if a new Message Consumer joins
 void returnMessage(MessageIdentity messageIdentity)
          After a poll() on the Container, if a message can't be dispatched, it is returned
 void setDeadLetterQueue(boolean value)
          set this MessageContainer to be a dead letter queue
 void start()
          This container has just been loaded from disk and so it needs to be recovered, that is iterate through all the message IDs in the persistent store and add them to the in memory list of message IDs to be dispatched by consumers
 
Methods inherited from interface org.activemq.service.MessageContainer
addMessage, containsMessage, delete, getDestinationName, getMessage, getMessageContainerAdmin, isDeadLetterQueue, registerMessageInterest, unregisterMessageInterest
 
Methods inherited from interface org.activemq.service.Service
stop
 

Method Detail

poll

ActiveMQMessage poll()
                     throws JMSException
Some implementations may need to poll to fill subscriptions this returns the next message in the container

Returns:
the next message
Throws:
JMSException

peekNext

ActiveMQMessage peekNext(MessageIdentity messageIdentity)
                         throws JMSException
Used for browsing a MessageContainer this returns the next message in the container after the messageId

Parameters:
messageIdentity - the id if the message. If this is null, the first message will be retrieved
Returns:
the next message without updating it's state to being dispatched
Throws:
JMSException

returnMessage

void returnMessage(MessageIdentity messageIdentity)
                   throws JMSException
After a poll() on the Container, if a message can't be dispatched, it is returned

Parameters:
messageIdentity -
Throws:
JMSException

reset

void reset()
           throws JMSException
called to reset dispatch pointers if a new Message Consumer joins

Throws:
JMSException

start

void start()
           throws JMSException
This container has just been loaded from disk and so it needs to be recovered, that is iterate through all the message IDs in the persistent store and add them to the in memory list of message IDs to be dispatched by consumers

Specified by:
start in interface Service
Throws:
JMSException

recoverMessageToBeDelivered

void recoverMessageToBeDelivered(MessageIdentity messageIdentity)
                                 throws JMSException
Invoked during the recovery to add the given message to the end of the messages to be delivered.

Throws:
JMSException

setDeadLetterQueue

void setDeadLetterQueue(boolean value)
set this MessageContainer to be a dead letter queue

Parameters:
value -


Copyright © 2004-2008 Protique, Ltd.. All Rights Reserved.