Class 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 Detail

      • 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:
        getObjectFromOMNode in interface XMLToObjectMapper
        Parameters:
        om - configuration from which the object is built
        properties - bag of properties to pass in any information to the factory
        Returns:
        built object