message.store
Class BasicMessageStore

java.lang.Object
  extended bymessage.store.BasicMessageStore
All Implemented Interfaces:
MessageStore, java.io.Serializable

public class BasicMessageStore
extends java.lang.Object
implements MessageStore, java.io.Serializable

Storage and retrieval of portlet message mappings, and the messages. The MessageStore instance is kept within the MessageCentre instance for the portlet webapp. This implementation just stores the messages locally in Maps, and therefore if a BasicMessageStore is set as the store for a MessageCentre, the messages will only be visible to portlets within the same webapp.

See Also:
Serialized Form

Field Summary
protected  java.util.Map inputKeyMap
           
protected  java.util.Map msgBoxes
           
protected  java.util.Map outputKeyMap
           
 
Constructor Summary
BasicMessageStore()
           
 
Method Summary
 void clearAllOutputMappings(MessageBoxKey key)
           
 void deleteInput(MessageBoxKey key)
           
 void deleteOutput(MessageBoxKey key)
           
 java.util.Set findOutputTargets(MessageBoxKey key)
           
 java.util.Set getAllInputKeys()
           
 java.util.Set getAllOutputKeys()
           
 java.util.Map getBoxes()
           
 java.util.Set getInputKeys(java.lang.String portletID)
           
 MessageBoxKey getInputSource(MessageBoxKey key)
           
protected  java.util.Set getKeysWithNamespace(java.util.Collection searchKeys, java.lang.String ns)
           
 java.lang.Object getMessage(MessageBoxKey key)
           
 java.util.Set getOutputKeys(java.lang.String portletID)
           
 java.util.Set getPublicBoxKeys()
           
 void initialise(java.lang.String sessionID)
           
 boolean isValid()
           
 void saveInputMapping(MessageBoxKey key, MessageBoxKey source)
           
 void saveOutputMapping(MessageBoxKey key, MessageBoxKey target)
           
 void sendMessage(java.util.Set targetKeys, java.lang.Object message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputKeyMap

protected java.util.Map inputKeyMap

outputKeyMap

protected java.util.Map outputKeyMap

msgBoxes

protected java.util.Map msgBoxes
Constructor Detail

BasicMessageStore

public BasicMessageStore()
Method Detail

initialise

public void initialise(java.lang.String sessionID)
Specified by:
initialise in interface MessageStore

saveInputMapping

public void saveInputMapping(MessageBoxKey key,
                             MessageBoxKey source)
Specified by:
saveInputMapping in interface MessageStore

deleteInput

public void deleteInput(MessageBoxKey key)
Specified by:
deleteInput in interface MessageStore

saveOutputMapping

public void saveOutputMapping(MessageBoxKey key,
                              MessageBoxKey target)
Specified by:
saveOutputMapping in interface MessageStore

clearAllOutputMappings

public void clearAllOutputMappings(MessageBoxKey key)
Specified by:
clearAllOutputMappings in interface MessageStore

deleteOutput

public void deleteOutput(MessageBoxKey key)
Specified by:
deleteOutput in interface MessageStore

findOutputTargets

public java.util.Set findOutputTargets(MessageBoxKey key)
Specified by:
findOutputTargets in interface MessageStore

getInputSource

public MessageBoxKey getInputSource(MessageBoxKey key)
Specified by:
getInputSource in interface MessageStore

getMessage

public java.lang.Object getMessage(MessageBoxKey key)
Specified by:
getMessage in interface MessageStore

sendMessage

public void sendMessage(java.util.Set targetKeys,
                        java.lang.Object message)
Specified by:
sendMessage in interface MessageStore

getInputKeys

public java.util.Set getInputKeys(java.lang.String portletID)
Specified by:
getInputKeys in interface MessageStore

getOutputKeys

public java.util.Set getOutputKeys(java.lang.String portletID)
Specified by:
getOutputKeys in interface MessageStore

getPublicBoxKeys

public java.util.Set getPublicBoxKeys()
Specified by:
getPublicBoxKeys in interface MessageStore

getBoxes

public java.util.Map getBoxes()
Specified by:
getBoxes in interface MessageStore

getAllInputKeys

public java.util.Set getAllInputKeys()
Specified by:
getAllInputKeys in interface MessageStore

getAllOutputKeys

public java.util.Set getAllOutputKeys()
Specified by:
getAllOutputKeys in interface MessageStore

isValid

public boolean isValid()
Specified by:
isValid in interface MessageStore

getKeysWithNamespace

protected java.util.Set getKeysWithNamespace(java.util.Collection searchKeys,
                                             java.lang.String ns)