org.jboss.soa.esb.services.persistence
Interface MessageStore

All Known Subinterfaces:
RedeliverStore

public interface MessageStore


Field Summary
static java.lang.String CLASSIFICATION
           
static java.lang.String CLASSIFICATION_DEFAULT
           
static java.lang.String CLASSIFICATION_DLQ
           
static java.lang.String CLASSIFICATION_RDLVR
           
static java.lang.String DEFAULT
           
static java.lang.String MESSAGE_URI
           
 
Method Summary
 java.net.URI addMessage(Message message, java.lang.String classification)
          Add a message to the store.
 java.util.Map<java.net.URI,Message> getAllMessages(java.lang.String classification)
          Get a map of all messages for a certain classification.
 Message getMessage(java.net.URI uid)
          Get a message from the store by URI.
 Message getMessage(java.net.URI uid, java.lang.String classification)
          Get a message from the store by URI.
 MessageURIGenerator getMessageURIGenerator()
          Get the implementation-specific message URI generator.
 java.util.Map<java.net.URI,Message> getUndeliveredMessages(java.lang.String classification)
          Get a map of undelivered messages.
 int removeMessage(java.net.URI uid, java.lang.String classification)
          Removes a message from the store by URI.
 void setDelivered(java.net.URI uid)
          Indicate that a message has been delivered.
 void setUndelivered(java.net.URI uid)
          Indicate that a message has not been delivered.
 

Field Detail

DEFAULT

static final java.lang.String DEFAULT
See Also:
Constant Field Values

CLASSIFICATION

static final java.lang.String CLASSIFICATION
See Also:
Constant Field Values

CLASSIFICATION_DEFAULT

static final java.lang.String CLASSIFICATION_DEFAULT
See Also:
Constant Field Values

CLASSIFICATION_DLQ

static final java.lang.String CLASSIFICATION_DLQ
See Also:
Constant Field Values

CLASSIFICATION_RDLVR

static final java.lang.String CLASSIFICATION_RDLVR
See Also:
Constant Field Values

MESSAGE_URI

static final java.lang.String MESSAGE_URI
See Also:
Constant Field Values
Method Detail

getMessageURIGenerator

MessageURIGenerator getMessageURIGenerator()
Get the implementation-specific message URI generator.

Returns:
the generator

addMessage

java.net.URI addMessage(Message message,
                        java.lang.String classification)
                        throws MessageStoreException
Add a message to the store.

Parameters:
message - the message to store
Returns:
the URI of the generated message
Throws:
MessageStoreException

getMessage

Message getMessage(java.net.URI uid)
                   throws MessageStoreException
Get a message from the store by URI.

Parameters:
uid - the unique message id
Returns:
the message or null if it does not exist
Throws:
MessageStoreException

setUndelivered

void setUndelivered(java.net.URI uid)
                    throws MessageStoreException
Indicate that a message has not been delivered.

Parameters:
uid -
Throws:
MessageStoreException

setDelivered

void setDelivered(java.net.URI uid)
                  throws MessageStoreException
Indicate that a message has been delivered.

Parameters:
uid - the unique message id
Throws:
MessageStoreException

getUndeliveredMessages

java.util.Map<java.net.URI,Message> getUndeliveredMessages(java.lang.String classification)
                                                           throws MessageStoreException
Get a map of undelivered messages.

Returns:
Map
Throws:
MessageStoreException

getAllMessages

java.util.Map<java.net.URI,Message> getAllMessages(java.lang.String classification)
                                                   throws MessageStoreException
Get a map of all messages for a certain classification.

Parameters:
classification -
Returns:
map
Throws:
MessageStoreException

getMessage

Message getMessage(java.net.URI uid,
                   java.lang.String classification)
                   throws MessageStoreException
Get a message from the store by URI.

Parameters:
uid - the unique message id
classification - the classification of the message
Returns:
the message or null if it does not exist
Throws:
MessageStoreException

removeMessage

int removeMessage(java.net.URI uid,
                  java.lang.String classification)
                  throws MessageStoreException
Removes a message from the store by URI.

Parameters:
uid - the unique message id
classification - the classification of the message
Returns:
int response from the SQL delete command
Throws:
MessageStoreException