org.exolab.jms.tools.migration.proxy
Class Messages

java.lang.Object
  |
  +--org.exolab.jms.tools.migration.proxy.Messages

public class Messages
extends java.lang.Object

Provides persistency for Message instances.

Version:
$Revision: 1.6 $ $Date: 2001/09/18 22:54:44 $
Author:
Tim Anderson

Constructor Summary
Messages(Context context)
          Construct a new Messages instance
 
Method Summary
 void add(javax.jms.Message message)
          Add a new message
 javax.jms.Message get(java.lang.String messageId)
          Returns a message for a given identifier
 java.util.List getMessageIds()
          Returns all message identifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages(Context context)
Construct a new Messages instance
Parameters:
context - context information
Method Detail

add

public void add(javax.jms.Message message)
         throws javax.jms.JMSException,
                java.sql.SQLException
Add a new message
Parameters:
message - the message to add
Throws:
javax.jms.JMSException - if a messaging service error is encountered
java.sql.SQLException - if a database error is encountered

get

public javax.jms.Message get(java.lang.String messageId)
                      throws javax.jms.JMSException,
                             java.sql.SQLException
Returns a message for a given identifier
Parameters:
messageId - the identity of the message
Returns:
the message corresponding to messageId or null if no such message exists
Throws:
javax.jms.JMSException - if a messaging service error is encountered
java.sql.SQLException - if an database error is encountered

getMessageIds

public java.util.List getMessageIds()
                             throws java.sql.SQLException
Returns all message identifiers
Returns:
a list of message identifiers
Throws:
java.sql.SQLException - if a database error is encountered


Copyright © 1999-2003 The OpenJMS Group. All Rights Reserved.