org.mule.config.spring.parsers.specific
Class SimpleComponentDefinitionParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser
          extended by org.mule.config.spring.parsers.AbstractHierarchicalDefinitionParser
              extended by org.mule.config.spring.parsers.AbstractChildDefinitionParser
                  extended by org.mule.config.spring.parsers.generic.ChildDefinitionParser
                      extended by org.mule.config.spring.parsers.specific.ComponentDefinitionParser
                          extended by org.mule.config.spring.parsers.specific.SimpleComponentDefinitionParser
All Implemented Interfaces:
MuleChildDefinitionParser, MuleDefinitionParser, MuleDefinitionParserConfiguration, org.springframework.beans.factory.xml.BeanDefinitionParser

public class SimpleComponentDefinitionParser
extends ComponentDefinitionParser

Used to parse shortcut elements for simple built-in components such as BridgeComponent, org.mule.component.simple.EchoComponent and org.mule.component.simple.LogComponent. This allows shortcuts like for example <mule:bridge-service/> to be used instead of having to use the <mule:service/> element and specify the class name (and scope) for built-in components that don't require configuration.

This DefinitionParser should only be used for state-less components.

In order to further customize components and use serviceFactory properties the <mule:service/> element should be used.


Field Summary
 
Fields inherited from class org.mule.config.spring.parsers.generic.ChildDefinitionParser
clazz, setterMethod
 
Fields inherited from class org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser
ATTRIBUTE_CLASS, ATTRIBUTE_ID, ATTRIBUTE_NAME, ATTRIBUTE_REF, ATTRIBUTE_REF_SUFFIX, ATTRIBUTE_REFS, ATTRIBUTE_REFS_SUFFIX, beanPropertyConfiguration, logger, ROOT_ELEMENT, singleton
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE
 
Constructor Summary
SimpleComponentDefinitionParser(Class component, Class componentInstanceClass)
           
 
Method Summary
protected  void parseChild(Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
           
protected  void preProcess(Element element)
          Hook method that derived classes can implement to modify internal state before processing.
 
Methods inherited from class org.mule.config.spring.parsers.generic.ChildDefinitionParser
getBeanClass, getPropertyName
 
Methods inherited from class org.mule.config.spring.parsers.AbstractChildDefinitionParser
doParse, getBeanName, postProcess
 
Methods inherited from class org.mule.config.spring.parsers.AbstractHierarchicalDefinitionParser
forceParent, getBeanAssembler, getOrphanBeanAssembler, getParentBeanDefinition, getParentBeanName, getTargetPropertyConfiguration
 
Methods inherited from class org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser
addAlias, addBeanFlag, addCollection, addIgnored, addMapping, addMapping, addMapping, addReference, checkElementNameUnique, createBeanDefinitionBuilder, getBeanAssemblerFactory, getBeanClassFromAttribute, getClassConstraint, getClassInternal, getParserContext, getRegistry, isAllowClassAttribute, isSingleton, isTopLevel, muleParse, parseInternal, processProperty, registerPostProcessor, registerPreProcessor, removeIgnored, resolveId, setAllowClassAttribute, setBeanAssemblerFactory, setClassConstraint, setIgnoredDefault, setParserContext, setRegistry
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.config.spring.parsers.MuleChildDefinitionParser
forceParent, getTargetPropertyConfiguration
 
Methods inherited from interface org.mule.config.spring.parsers.MuleDefinitionParser
muleParse
 
Methods inherited from interface org.springframework.beans.factory.xml.BeanDefinitionParser
parse
 
Methods inherited from interface org.mule.config.spring.parsers.MuleDefinitionParserConfiguration
addAlias, addBeanFlag, addCollection, addIgnored, addMapping, addMapping, addMapping, addReference, registerPostProcessor, registerPreProcessor, removeIgnored, setIgnoredDefault
 

Constructor Detail

SimpleComponentDefinitionParser

public SimpleComponentDefinitionParser(Class component,
                                       Class componentInstanceClass)
Method Detail

preProcess

protected void preProcess(Element element)
Description copied from class: AbstractMuleBeanDefinitionParser
Hook method that derived classes can implement to modify internal state before processing. Here we make sure that the internal property configuration state is reset to the initial configuration for each element (it may be modified by the BeanAssembler) and that other mutable instance variables are cleared.

Overrides:
preProcess in class ChildDefinitionParser

parseChild

protected void parseChild(Element element,
                          org.springframework.beans.factory.xml.ParserContext parserContext,
                          org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Overrides:
parseChild in class ComponentDefinitionParser


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.