Class ExecutorStore
java.lang.Object
org.wso2.carbon.mediation.initializer.persistence.AbstractStore<org.apache.synapse.commons.executors.PriorityExecutor>
org.wso2.carbon.mediation.initializer.persistence.ExecutorStore
public class ExecutorStore
extends AbstractStore<org.apache.synapse.commons.executors.PriorityExecutor>
-
Field Summary
Fields inherited from class org.wso2.carbon.mediation.initializer.persistence.AbstractStore
configPath, log, serializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteFile(String fileName, org.apache.synapse.config.SynapseConfiguration synapseConfiguration) Delete the specified file from the persistence store.protected StringgetFileName(org.apache.synapse.commons.executors.PriorityExecutor executor) Inspect the given object and find the file name to which it should be serialized toprotected org.apache.synapse.commons.executors.PriorityExecutorgetObjectToPersist(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.OMElementsaveToFile(org.apache.synapse.commons.executors.PriorityExecutor executor, org.apache.synapse.config.SynapseConfiguration synapseConfig) Serialize and save the given object to the local file systemprotected org.apache.axiom.om.OMElementserialize(org.apache.synapse.commons.executors.PriorityExecutor executor) Serialize the given object into XMLMethods inherited from class org.wso2.carbon.mediation.initializer.persistence.AbstractStore
delete, handleException, save
-
Constructor Details
-
ExecutorStore
-
-
Method Details
-
saveToFile
protected org.apache.axiom.om.OMElement saveToFile(org.apache.synapse.commons.executors.PriorityExecutor executor, org.apache.synapse.config.SynapseConfiguration synapseConfig) Description copied from class:AbstractStoreSerialize and save the given object to the local file system- Specified by:
saveToFilein classAbstractStore<org.apache.synapse.commons.executors.PriorityExecutor>- Parameters:
executor- 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 synapseConfiguration) Description copied from class:AbstractStoreDelete 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:
deleteFilein classAbstractStore<org.apache.synapse.commons.executors.PriorityExecutor>- Parameters:
fileName- Name of the file to be deletedsynapseConfiguration- synapse configuration
-
getObjectToPersist
protected org.apache.synapse.commons.executors.PriorityExecutor getObjectToPersist(String name, org.apache.synapse.config.SynapseConfiguration config) Description copied from class:AbstractStoreFind the specified object from the SynaspeConfiguration to be saved to the persistence store- Specified by:
getObjectToPersistin classAbstractStore<org.apache.synapse.commons.executors.PriorityExecutor>- 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
Description copied from class:AbstractStoreInspect the given object and find the file name to which it should be serialized to- Specified by:
getFileNamein classAbstractStore<org.apache.synapse.commons.executors.PriorityExecutor>- Parameters:
executor- 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.commons.executors.PriorityExecutor executor) Description copied from class:AbstractStoreSerialize the given object into XML- Specified by:
serializein classAbstractStore<org.apache.synapse.commons.executors.PriorityExecutor>- Parameters:
executor- The object to be serialized- Returns:
- The resulting OMElement
-