org.apache.airavata.wsmg.msgbox.Storage.dbpool
Class DatabaseStorageImpl

java.lang.Object
  extended by org.apache.airavata.wsmg.msgbox.Storage.dbpool.DatabaseStorageImpl
All Implemented Interfaces:
MsgBoxStorage

public class DatabaseStorageImpl
extends Object
implements MsgBoxStorage

Database message Storage Implementation, if msgBox.properties configured to use database this will set as the storage for MsgBoxSerivceSkeleton


Constructor Summary
DatabaseStorageImpl(String jdbcUrl, String jdbcDriver, long timeOfOldMessage)
           
 
Method Summary
 String createMsgBox()
           
 void destroyMsgBox(String key)
           
 void dispose()
          Clean up method
 void putMessageIntoMsgBox(String msgBoxID, String messageID, String soapAction, org.apache.axiom.om.OMElement message)
           
 void removeAncientMessages()
          The ancientness is defined in the db.config file.
 List<String> takeMessagesFromMsgBox(String key)
          IMPORTANT::: List retrieved from this method is sorted by time in ascending order i.e the newest message will appear as the last item in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseStorageImpl

public DatabaseStorageImpl(String jdbcUrl,
                           String jdbcDriver,
                           long timeOfOldMessage)
Method Detail

createMsgBox

public String createMsgBox()
                    throws SQLException,
                           IOException
Specified by:
createMsgBox in interface MsgBoxStorage
Throws:
SQLException
IOException

destroyMsgBox

public void destroyMsgBox(String key)
                   throws Exception
Specified by:
destroyMsgBox in interface MsgBoxStorage
Throws:
Exception

takeMessagesFromMsgBox

public List<String> takeMessagesFromMsgBox(String key)
                                    throws Exception
Description copied from interface: MsgBoxStorage
IMPORTANT::: List retrieved from this method is sorted by time in ascending order i.e the newest message will appear as the last item in the list.

Specified by:
takeMessagesFromMsgBox in interface MsgBoxStorage
Returns:
Throws:
Exception

putMessageIntoMsgBox

public void putMessageIntoMsgBox(String msgBoxID,
                                 String messageID,
                                 String soapAction,
                                 org.apache.axiom.om.OMElement message)
                          throws SQLException,
                                 IOException,
                                 XMLStreamException
Specified by:
putMessageIntoMsgBox in interface MsgBoxStorage
Throws:
SQLException
IOException
XMLStreamException

removeAncientMessages

public void removeAncientMessages()
                           throws Exception
Description copied from interface: MsgBoxStorage
The ancientness is defined in the db.config file.

Specified by:
removeAncientMessages in interface MsgBoxStorage
Throws:
Exception

dispose

public void dispose()
Description copied from interface: MsgBoxStorage
Clean up method

Specified by:
dispose in interface MsgBoxStorage


Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.