org.apache.synapse.config.xml
Class MediatorFactoryFinder

java.lang.Object
  extended by 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
 Map<QName,Class> getFactoryMap()
          This method exposes all the MediatorFactories and its Extensions
static MediatorFactoryFinder getInstance()
           
 Mediator getMediator(OMElement element, Properties properties)
          This method returns a Processor given an OMElement.
 Object getObjectFromOMNode(OMNode om, Properties properties)
          Allow the mediator factory finder to act as an XMLToObjectMapper for Mediators (i.e.
static void reset()
          Force re initialization next time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MediatorFactoryFinder getInstance()

reset

public static void reset()
Force re initialization next time


getMediator

public Mediator getMediator(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

getFactoryMap

public Map<QName,Class> getFactoryMap()
This method exposes all the MediatorFactories and its Extensions

Returns:
factoryMap

getObjectFromOMNode

public Object getObjectFromOMNode(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


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