org.activemq.store
Interface MessageStore

All Superinterfaces:
Service
All Known Subinterfaces:
TopicMessageStore
All Known Implementing Classes:
CacheMessageStore, CacheTopicMessageStore, JDBCMessageStore, JDBCTopicMessageStore, JournalMessageStore, JournalTopicMessageStore, ProxyMessageStore, ProxyTopicMessageStore, VMMessageStore, VMTopicMessageStore

public interface MessageStore
extends Service

Represents a message store which is used by the persistent MessageContainer implementations

Version:
$Revision: 1.1.1.1 $

Method Summary
 void addMessage(ActiveMQMessage message)
          Adds a message to the message store
 ActiveMQMessage getMessage(MessageIdentity identity)
          Looks up a message using either the String messageID or the messageNumber.
 void recover(RecoveryListener container)
          Recover any messages to be delivered.
 void removeAllMessages()
          Removes all the messages from the message store.
 void removeMessage(MessageAck ack)
          Removes a message from the message store.
 
Methods inherited from interface org.activemq.service.Service
start, stop
 

Method Detail

addMessage

void addMessage(ActiveMQMessage message)
                throws JMSException
Adds a message to the message store

Throws:
JMSException

getMessage

ActiveMQMessage getMessage(MessageIdentity identity)
                           throws JMSException
Looks up a message using either the String messageID or the messageNumber. Implementations are encouraged to fill in the missing key if its easy to do so.

Parameters:
identity - which contains either the messageID or the messageNumber
Returns:
the message or null if it does not exist
Throws:
JMSException

removeMessage

void removeMessage(MessageAck ack)
                   throws JMSException
Removes a message from the message store.

Parameters:
ack - the ack request that cause the message to be removed. It conatins the identity which contains the messageID of the message that needs to be removed.
Throws:
JMSException

removeAllMessages

void removeAllMessages()
                       throws JMSException
Removes all the messages from the message store.

Throws:
JMSException

recover

void recover(RecoveryListener container)
             throws JMSException
Recover any messages to be delivered.

Parameters:
container -
Throws:
JMSException


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