Package org.springframework.beans.factory.parsing

Examples of org.springframework.beans.factory.parsing.CompositeComponentDefinition


    ManagedList<AbstractBeanDefinition> listeners = new ManagedList<AbstractBeanDefinition>();

    if (listenersElements.size() == 1) {
      Element listenersElement = listenersElements.get(0);
      CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(listenersElement.getTagName(),
          parserContext.extractSource(element));
      parserContext.pushContainingComponent(compositeDef);
      listeners.setMergeEnabled(false);
      List<Element> listenerElements = DomUtils.getChildElementsByTagName(listenersElement, LISTENER_ELEMENT);
      for (Element listenerElement : listenerElements) {
View Full Code Here


  protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {

    List<BeanDefinition> stateTransitions = new ArrayList<BeanDefinition>();

    SplitParser splitParser = new SplitParser(jobFactoryRef);
    CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(),
        parserContext.extractSource(element));
    parserContext.pushContainingComponent(compositeDef);

    boolean stepExists = false;
    Map<String, Set<String>> reachableElementMap = new LinkedHashMap<String, Set<String>>();
View Full Code Here

      ParserContext parserContext) {
    MutablePropertyValues propertyValues = beanDefinition.getPropertyValues();
    List<Element> listenersElements = DomUtils.getChildElementsByTagName(stepElement, LISTENERS_ELE);
    if (listenersElements.size() == 1) {
      Element listenersElement = listenersElements.get(0);
      CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(listenersElement.getTagName(),
          parserContext.extractSource(stepElement));
      parserContext.pushContainingComponent(compositeDef);
      ManagedList<BeanDefinition> listenerBeans = new ManagedList<BeanDefinition>();
      if (propertyValues.contains("listeners")) {
        listenerBeans = (ManagedList<BeanDefinition>) propertyValues.getPropertyValue("listeners").getValue();
View Full Code Here

  }

  protected void registerJmxComponents(String mongoRefName, Element element, ParserContext parserContext) {
    Object eleSource = parserContext.extractSource(element);

    CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), eleSource);

    createBeanDefEntry(AssertMetrics.class, compositeDef, mongoRefName, eleSource, parserContext);
    createBeanDefEntry(BackgroundFlushingMetrics.class, compositeDef, mongoRefName, eleSource, parserContext);
    createBeanDefEntry(BtreeIndexCounters.class, compositeDef, mongoRefName, eleSource, parserContext);
    createBeanDefEntry(ConnectionMetrics.class, compositeDef, mongoRefName, eleSource, parserContext);
View Full Code Here

    MongoParsingUtils.parseMongoOptions(element, builder);
    MongoParsingUtils.parseReplicaSet(element, builder);

    String defaultedId = StringUtils.hasText(id) ? id : BeanNames.MONGO_BEAN_NAME;

    parserContext.pushContainingComponent(new CompositeComponentDefinition("Mongo", source));

    BeanComponentDefinition mongoComponent = helper.getComponent(builder, defaultedId);
    parserContext.registerBeanComponent(mongoComponent);
    BeanComponentDefinition serverAddressPropertyEditor = helper.getComponent(registerServerAddressPropertyEditor());
    parserContext.registerBeanComponent(serverAddressPropertyEditor);
View Full Code Here

    BeanDefinitionRegistry registry = parserContext.getRegistry();
    String id = element.getAttribute(AbstractBeanDefinitionParser.ID_ATTRIBUTE);
    id = StringUtils.hasText(id) ? id : DEFAULT_CONVERTER_BEAN_NAME;

    parserContext.pushContainingComponent(new CompositeComponentDefinition("Mapping Mongo Converter", element));

    BeanDefinition conversionsDefinition = getCustomConversions(element, parserContext);
    String ctxRef = potentiallyCreateMappingContext(element, parserContext, conversionsDefinition, id);

    createIsNewStrategyFactoryBeanDefinition(ctxRef, parserContext, element);
View Full Code Here

 
  @Override
  public BeanDefinition parse(Element element, ParserContext parserContext) {
    Object source = parserContext.extractSource(element);

    CompositeComponentDefinition compDefinition = new CompositeComponentDefinition(element.getTagName(), source);
    parserContext.pushContainingComponent(compDefinition);

    BeanDefinitionRegistry registry = parserContext.getRegistry();

    if (registry.containsBeanDefinition(STAT_ANNOTATION_PROCESSOR_BEAN_NAME)) {
View Full Code Here

                if (element.hasAttribute("order")) {
                    advisorDef.getPropertyValues().add("order", element.getAttribute("order"));
                }
                parserContext.getRegistry().registerBeanDefinition(ProxyCircuitBreakerConfiguration.CIRCUIT_BREAKER_ADVISOR_BEAN_NAME, advisorDef);

                CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(),
                        eleSource);
                compositeDef.addNestedComponent(new BeanComponentDefinition(sourceDef, sourceName));
                compositeDef.addNestedComponent(new BeanComponentDefinition(interceptorDef, interceptorName));
                compositeDef.addNestedComponent(new BeanComponentDefinition(advisorDef, ProxyCircuitBreakerConfiguration.CIRCUIT_BREAKER_ADVISOR_BEAN_NAME));
                parserContext.registerComponent(compositeDef);
            }
        }
View Full Code Here

        Map<String, String> patternMap = prepareReplacement(element);

        MappingBeanDefinitionVisitor visitor = new MappingBeanDefinitionVisitor(patternMap);
        Map<String, BeanDefinition> beansDefinition = loadTemplateBeans(element, visitor);

        CompositeComponentDefinition def = new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element));

        parserContext.pushContainingComponent(def);

        registerBeans(parserContext, beansDefinition);
View Full Code Here

        // Create the AnnotationMethodCacheAdvice definition.
        RootBeanDefinition adviceDef = createAnnotationMethodCacheAdviceDefinition(element,eleSource,interceptorName);
        parserContext.getRegistry().registerBeanDefinition(METHOD_CACHE_ADVICE_BEAN_NAME, adviceDef);
       
        //此处代码无用,只是注册了一个 tagName的CompositeComponentDefinition
        CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), eleSource);
        compositeDef.addNestedComponent(new BeanComponentDefinition(adviceDef, METHOD_CACHE_ADVICE_BEAN_NAME));
        compositeDef.addNestedComponent(new BeanComponentDefinition(interceptorDef, interceptorName));
        parserContext.registerComponent(compositeDef);
       
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.parsing.CompositeComponentDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.