Package org.apache.synapse.config.xml
Class ConfigurationFactoryAndSerializerFinder
- java.lang.Object
-
- org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder
-
- All Implemented Interfaces:
XMLToObjectMapper
public class ConfigurationFactoryAndSerializerFinder extends Object implements XMLToObjectMapper
This class is based on J2SE Service Provider model http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider It deals with both the problem of turning an XML into a Synapse config and vice-versa
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SynapseConfigurationgetConfiguration(org.apache.axiom.om.OMElement element, Properties properties)This method returns a Processor given an OMElement.MapgetFactoryMap()This method exposes all the ConfigurationFactories and its Extensionsstatic ConfigurationFactoryAndSerializerFindergetInstance()ObjectgetObjectFromOMNode(org.apache.axiom.om.OMNode om, Properties properties)Allow the mediator factory finder to act as an XMLToObjectMapper for Mediators (i.e.static MapgetSerializerMap()This method exposes all the ConfigurationSerializer and its Extensionsstatic voidreset()Force re initialization next timestatic org.apache.axiom.om.OMElementserializeConfiguration(SynapseConfiguration synCfg)static org.apache.axiom.om.OMElementserializeConfiguration(SynapseConfiguration synCfg, QName qName)This method will serialize the config using the supplied QName (looking up the right class to do it)
-
-
-
Method Detail
-
getInstance
public static ConfigurationFactoryAndSerializerFinder getInstance()
-
reset
public static void reset()
Force re initialization next time
-
getConfiguration
public SynapseConfiguration getConfiguration(org.apache.axiom.om.OMElement element, Properties properties)
This method returns a Processor given an OMElement. This will be used recursively by the elements which contain processor elements themselves (e.g. rules)- Parameters:
element-- Returns:
- Processor
-
serializeConfiguration
public static org.apache.axiom.om.OMElement serializeConfiguration(SynapseConfiguration synCfg)
- Parameters:
synCfg-- Returns:
-
serializeConfiguration
public static org.apache.axiom.om.OMElement serializeConfiguration(SynapseConfiguration synCfg, QName qName)
This method will serialize the config using the supplied QName (looking up the right class to do it)- Parameters:
synCfg-qName-- Throws:
XMLStreamException
-
getFactoryMap
public Map getFactoryMap()
This method exposes all the ConfigurationFactories and its Extensions- Returns:
- Map of factories
-
getSerializerMap
public static Map getSerializerMap()
This method exposes all the ConfigurationSerializer and its Extensions- Returns:
- Map of serializers
-
getObjectFromOMNode
public Object getObjectFromOMNode(org.apache.axiom.om.OMNode om, Properties properties)
Allow the mediator factory finder to act as an XMLToObjectMapper for Mediators (i.e. Sequence Mediator) loaded dynamically from a Registry- Specified by:
getObjectFromOMNodein interfaceXMLToObjectMapper- Parameters:
om- configuration from which the object is builtproperties- bag of properties to pass in any information to the factory- Returns:
- built object
-
-