Class MediatorFactoryFinder

  • All Implemented Interfaces:
    XMLToObjectMapper

    public class MediatorFactoryFinder
    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
    • Method Detail

      • reset

        public static void reset()
        Force re initialization next time
      • getMediator

        public Mediator getMediator​(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 - XML representation of a mediator
        properties - bag of properties to pass in any information to the factory
        Returns:
        Processor
      • getMediator

        public Mediator getMediator​(org.apache.axiom.om.OMElement element,
                                    Properties properties,
                                    SynapseConfiguration configuration)
        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 - XML representation of a mediator
        properties - bag of properties to pass in any information to the factory
        Returns:
        Processor
      • getFactoryMap

        public Map<QName,​Class> getFactoryMap()
        This method exposes all the MediatorFactories and its Extensions
        Returns:
        factoryMap
      • 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 - node from which the object is expected
        properties - bag of properties to pass in any information to the factory
        Returns:
        Object buit from the om node
      • setSynapseLibraryMap

        public void setSynapseLibraryMap​(Map<String,​Library> synapseLibraryMap)
      • getCallTemplateFromConnector

        public org.apache.axiom.om.OMElement getCallTemplateFromConnector​(org.apache.axiom.om.OMElement connectorElem,
                                                                          String libraryName)
      • getDynamicInvokeMediator

        public InvokeMediator getDynamicInvokeMediator​(org.apache.axiom.om.OMElement connectorElem,
                                                       String libraryName)