message.store
Class EJBMessageStore

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

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

Storage and retrieval of portlet message mappings, and the messages. They are stored on a remote EJB, which this class queries. This should be accessible to all portlet apps.

See Also:
Serialized Form

Field Summary
protected  java.lang.String sessionID
           
protected  PortalMessageStore store
           
 
Constructor Summary
EJBMessageStore()
           
 
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)
           
 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()
          Check if the store is valid, and re-initialise if necessary & possible.
 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

sessionID

protected java.lang.String sessionID

store

protected transient PortalMessageStore store
Constructor Detail

EJBMessageStore

public EJBMessageStore()
Method Detail

initialise

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

isValid

public boolean isValid()
Check if the store is valid, and re-initialise if necessary & possible. (e.g. if session has been serialised, we may need to retrieve the EJB reference again.)

Specified by:
isValid 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

getBoxes

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

getPublicBoxKeys

public java.util.Set getPublicBoxKeys()
Specified by:
getPublicBoxKeys 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