org.apache.airavata.wsmg.msgbox.Storage.memory
Class InMemoryImpl

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

public class InMemoryImpl
extends Object
implements MsgBoxStorage

This is the in memory storage implementation for MsgBoxService, this will be initialized if msgBox.properties is configured not to use database implementation.


Constructor Summary
InMemoryImpl(long time)
           
 
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

InMemoryImpl

public InMemoryImpl(long time)
Method Detail

createMsgBox

public String createMsgBox()
                    throws Exception
Specified by:
createMsgBox in interface MsgBoxStorage
Throws:
Exception

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 Exception
Specified by:
putMessageIntoMsgBox in interface MsgBoxStorage
Throws:
Exception

removeAncientMessages

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

Specified by:
removeAncientMessages in interface MsgBoxStorage

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.