org.apache.synapse.config.xml
Class StartupFinder

java.lang.Object
  extended by org.apache.synapse.config.xml.StartupFinder
All Implemented Interfaces:
XMLToObjectMapper

public class StartupFinder
extends Object
implements XMLToObjectMapper


Method Summary
 Map<QName,Class<? extends StartupFactory>> getFactoryMap()
           
static StartupFinder getInstance()
           
 Startup getObjectFromOMNode(OMNode om, Properties properties)
          Allow the startup finder to act as an XMLToObjectMapper for Startup (i.e.
 Map<QName,Class<? extends StartupSerializer>> getSerializerMap()
           
 Startup getStartup(OMElement element, Properties properties)
          This method returns a Processor given an OMElement.
 boolean isStartup(QName name)
          Check whether an element with the given qualified name defines a startup.
static void reset()
          Force re initialization next time
 OMElement serializeStartup(OMElement parent, Startup startup)
          This method will serialize the config using the supplied QName (looking up the right class to do it)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static StartupFinder getInstance()

reset

public static void reset()
Force re initialization next time


isStartup

public boolean isStartup(QName name)
Check whether an element with the given qualified name defines a startup.

Parameters:
name - to be identified whether it is a startup or not
Returns:
true if there is a startup registered with the factory map in the name, false if not

getStartup

public Startup getStartup(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 - configuration for creating the startup
properties - bag of properties with additional information
Returns:
Processor

serializeStartup

public OMElement serializeStartup(OMElement parent,
                                  Startup startup)
This method will serialize the config using the supplied QName (looking up the right class to do it)

Parameters:
parent - - Parent OMElement to which the created element will be added if not null
startup - - Startup to be serialized
Returns:
OMElement startup

getFactoryMap

public Map<QName,Class<? extends StartupFactory>> getFactoryMap()

getSerializerMap

public Map<QName,Class<? extends StartupSerializer>> getSerializerMap()

getObjectFromOMNode

public Startup getObjectFromOMNode(OMNode om,
                                   Properties properties)
Allow the startup finder to act as an XMLToObjectMapper for Startup (i.e. Startup) loaded dynamically from a Registry

Specified by:
getObjectFromOMNode in interface XMLToObjectMapper
Parameters:
om - to build the startup object
properties - bag of properties with additional information
Returns:
startup created


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