Package org.apache.synapse.config.xml
Class MediatorFactoryFinder
- java.lang.Object
-
- org.apache.synapse.config.xml.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.axiom.om.OMElement
getCallTemplateFromConnector(org.apache.axiom.om.OMElement connectorElem, String libraryName)
InvokeMediator
getDynamicInvokeMediator(org.apache.axiom.om.OMElement connectorElem, String libraryName)
Map<QName,Class>
getFactoryMap()
This method exposes all the MediatorFactories and its Extensionsstatic MediatorFactoryFinder
getInstance()
Mediator
getMediator(org.apache.axiom.om.OMElement element, Properties properties)
This method returns a Processor given an OMElement.Mediator
getMediator(org.apache.axiom.om.OMElement element, Properties properties, SynapseConfiguration configuration)
This method returns a Processor given an OMElement.Object
getObjectFromOMNode(org.apache.axiom.om.OMNode om, Properties properties)
Allow the mediator factory finder to act as an XMLToObjectMapper for Mediators (i.e.Map<String,SynapseImport>
getSynapseImportMap()
Map<String,Library>
getSynapseLibraryMap()
static void
main(String[] args)
static void
reset()
Force re initialization next timevoid
setSynapseImportMap(Map<String,SynapseImport> synapseImportMap)
void
setSynapseLibraryMap(Map<String,Library> synapseLibraryMap)
-
-
-
Method Detail
-
getInstance
public static MediatorFactoryFinder getInstance()
-
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 mediatorproperties
- 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 mediatorproperties
- 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 interfaceXMLToObjectMapper
- Parameters:
om
- node from which the object is expectedproperties
- bag of properties to pass in any information to the factory- Returns:
- Object buit from the om node
-
getSynapseImportMap
public Map<String,SynapseImport> getSynapseImportMap()
-
setSynapseImportMap
public void setSynapseImportMap(Map<String,SynapseImport> synapseImportMap)
-
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)
-
-