Class MessageStoreStore
- java.lang.Object
-
- org.wso2.carbon.mediation.initializer.persistence.AbstractStore<org.apache.synapse.message.store.MessageStore>
-
- org.wso2.carbon.mediation.initializer.persistence.MessageStoreStore
-
public class MessageStoreStore extends AbstractStore<org.apache.synapse.message.store.MessageStore>
-
-
Field Summary
-
Fields inherited from class org.wso2.carbon.mediation.initializer.persistence.AbstractStore
configPath, log, serializer
-
-
Constructor Summary
Constructors Constructor Description MessageStoreStore(String configPath, String configName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deleteFile(String fileName, org.apache.synapse.config.SynapseConfiguration config)
Delete the specified file from the persistence store.protected String
getFileName(org.apache.synapse.message.store.MessageStore messageStore)
Inspect the given object and find the file name to which it should be serialized toprotected org.apache.synapse.message.store.MessageStore
getObjectToPersist(String name, org.apache.synapse.config.SynapseConfiguration config)
Find the specified object from the SynaspeConfiguration to be saved to the persistence storeprotected org.apache.axiom.om.OMElement
saveToFile(org.apache.synapse.message.store.MessageStore store, org.apache.synapse.config.SynapseConfiguration synapseConfig)
Serialize and save the given object to the local file systemprotected org.apache.axiom.om.OMElement
serialize(org.apache.synapse.message.store.MessageStore obj)
Serialize the given object into XML-
Methods inherited from class org.wso2.carbon.mediation.initializer.persistence.AbstractStore
delete, handleException, save
-
-
-
-
Method Detail
-
saveToFile
protected org.apache.axiom.om.OMElement saveToFile(org.apache.synapse.message.store.MessageStore store, org.apache.synapse.config.SynapseConfiguration synapseConfig)
Description copied from class:AbstractStore
Serialize and save the given object to the local file system- Specified by:
saveToFile
in classAbstractStore<org.apache.synapse.message.store.MessageStore>
- Parameters:
store
- Object to be savedsynapseConfig
- synapse configuration- Returns:
- The OMElement generated as a result of the serialization or null
-
deleteFile
protected void deleteFile(String fileName, org.apache.synapse.config.SynapseConfiguration config)
Description copied from class:AbstractStore
Delete the specified file from the persistence store. File name is provided as an argument and it is up to the implementation to the calculate the exact file path using the file name and other available data.- Specified by:
deleteFile
in classAbstractStore<org.apache.synapse.message.store.MessageStore>
- Parameters:
fileName
- Name of the file to be deletedconfig
- synapse configuration
-
getObjectToPersist
protected org.apache.synapse.message.store.MessageStore getObjectToPersist(String name, org.apache.synapse.config.SynapseConfiguration config)
Description copied from class:AbstractStore
Find the specified object from the SynaspeConfiguration to be saved to the persistence store- Specified by:
getObjectToPersist
in classAbstractStore<org.apache.synapse.message.store.MessageStore>
- Parameters:
name
- Name or unique ID of the objectconfig
- Current SynapseConfiguration- Returns:
- The named object or null if such an object doesn't exist
-
getFileName
protected String getFileName(org.apache.synapse.message.store.MessageStore messageStore)
Description copied from class:AbstractStore
Inspect the given object and find the file name to which it should be serialized to- Specified by:
getFileName
in classAbstractStore<org.apache.synapse.message.store.MessageStore>
- Parameters:
messageStore
- The object to be inspected- Returns:
- A file name as a string or null if no file name is specified
-
serialize
protected org.apache.axiom.om.OMElement serialize(org.apache.synapse.message.store.MessageStore obj)
Description copied from class:AbstractStore
Serialize the given object into XML- Specified by:
serialize
in classAbstractStore<org.apache.synapse.message.store.MessageStore>
- Parameters:
obj
- The object to be serialized- Returns:
- The resulting OMElement
-
-