org.apache.synapse.config.xml
Class MultiXMLConfigurationSerializer

java.lang.Object
  extended by org.apache.synapse.config.xml.MultiXMLConfigurationSerializer

public class MultiXMLConfigurationSerializer
extends Object


Constructor Summary
MultiXMLConfigurationSerializer(String directoryPath)
           
 
Method Summary
 boolean isWritable()
           
 void serialize(SynapseConfiguration synapseConfig)
          Serializes the given SynapseConfiguration to the file system.
 OMElement serializeEndpoint(Endpoint epr, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeEventSource(SynapseEventSource source, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeExecutor(PriorityExecutor source, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeLocalEntry(Object o, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeMessageProcessor(MessageProcessor messageProcessor, SynapseConfiguration synapseConfiguration, OMElement parent)
           
 OMElement serializeMessageStore(MessageStore messagestore, SynapseConfiguration synConfig, OMElement parent)
           
 OMElement serializeProxy(ProxyService service, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeSequence(SequenceMediator seq, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeSynapseRegistry(Registry registry, SynapseConfiguration synapseConfig, OMElement parent)
           
 void serializeSynapseXML(SynapseConfiguration synapseConfig)
          Serialize only the elements defined in the top level synapse.xml file back to the synapse.xml file.
 OMElement serializeTask(Startup task, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeTemplate(TemplateMediator template, SynapseConfiguration synapseConfig, OMElement parent)
           
 OMElement serializeTemplate(Template template, SynapseConfiguration synapseConfig, OMElement parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiXMLConfigurationSerializer

public MultiXMLConfigurationSerializer(String directoryPath)
Method Detail

serialize

public void serialize(SynapseConfiguration synapseConfig)
Serializes the given SynapseConfiguration to the file system. This method is NOT thread safe and hence it must not be called by multiple concurrent threads. This method will first serialize the configuration to a temporary directory at the same level as the rootDirectory and then rename/move it as the new rootDirectory. If an error occurs while saving the configuration, the temporary files will be not be removed from the file system.

Parameters:
synapseConfig - configuration to be serialized

isWritable

public boolean isWritable()

serializeSynapseXML

public void serializeSynapseXML(SynapseConfiguration synapseConfig)
                         throws Exception
Serialize only the elements defined in the top level synapse.xml file back to the synapse.xml file. This method ignores the elements defined in files other than the synapse.xml. Can be used in situations where only the synapse.xml file should be updated at runtime.

Parameters:
synapseConfig - Current Synapse configuration
Throws:
Exception - on file I/O error

serializeSynapseRegistry

public OMElement serializeSynapseRegistry(Registry registry,
                                          SynapseConfiguration synapseConfig,
                                          OMElement parent)
                                   throws Exception
Throws:
Exception

serializeProxy

public OMElement serializeProxy(ProxyService service,
                                SynapseConfiguration synapseConfig,
                                OMElement parent)
                         throws Exception
Throws:
Exception

serializeEventSource

public OMElement serializeEventSource(SynapseEventSource source,
                                      SynapseConfiguration synapseConfig,
                                      OMElement parent)
                               throws Exception
Throws:
Exception

serializeTask

public OMElement serializeTask(Startup task,
                               SynapseConfiguration synapseConfig,
                               OMElement parent)
                        throws Exception
Throws:
Exception

serializeSequence

public OMElement serializeSequence(SequenceMediator seq,
                                   SynapseConfiguration synapseConfig,
                                   OMElement parent)
                            throws Exception
Throws:
Exception

serializeTemplate

public OMElement serializeTemplate(TemplateMediator template,
                                   SynapseConfiguration synapseConfig,
                                   OMElement parent)
                            throws Exception
Throws:
Exception

serializeTemplate

public OMElement serializeTemplate(Template template,
                                   SynapseConfiguration synapseConfig,
                                   OMElement parent)
                            throws Exception
Throws:
Exception

serializeEndpoint

public OMElement serializeEndpoint(Endpoint epr,
                                   SynapseConfiguration synapseConfig,
                                   OMElement parent)
                            throws Exception
Throws:
Exception

serializeLocalEntry

public OMElement serializeLocalEntry(Object o,
                                     SynapseConfiguration synapseConfig,
                                     OMElement parent)
                              throws Exception
Throws:
Exception

serializeExecutor

public OMElement serializeExecutor(PriorityExecutor source,
                                   SynapseConfiguration synapseConfig,
                                   OMElement parent)
                            throws Exception
Throws:
Exception

serializeMessageStore

public OMElement serializeMessageStore(MessageStore messagestore,
                                       SynapseConfiguration synConfig,
                                       OMElement parent)
                                throws Exception
Throws:
Exception

serializeMessageProcessor

public OMElement serializeMessageProcessor(MessageProcessor messageProcessor,
                                           SynapseConfiguration synapseConfiguration,
                                           OMElement parent)
                                    throws Exception
Throws:
Exception


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.