Spring Framework CompositeComponentDefinition - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework CompositeComponentDefinition class.

This code example shows how to use the following methods:addNestedComponent
This code example shows how to use the following methods:addNestedComponent
This code example shows how to use the following methods:
public class ProfileAwareCompositeComponentDefinition extends CompositeComponentDefinition {
	 
	private Set<String> profiles = null;
	 
	public ProfileAwareCompositeComponentDefinition(String name, Object source, String[] profiles) {
		super(name, source);
		if (profiles != null && profiles.length > 0) {
			this.profiles = new HashSet<String>(Arrays.asList(profiles));
		} 
		else { 
			this.profiles = Collections.emptySet();
		} 
	} 
	 
	/** 
	 * Returns the set of profiles for which this component and all children is valid 
	 * @return 
	 */ 
	public Set<String> getProfiles() {
		return profiles;
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
   * @param element the XML element which contains the attributes. 
   * @param parserContext encapsulates the parsing state and configuration. 
   */ 
  protected void registerJmxComponents(final String refName, final Element element, final ParserContext parserContext) {
    Object eleSource = parserContext.extractSource(element);
    CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), eleSource);
 
    createBeanDefEntry(ClientInfo.class, compositeDef, refName, eleSource, parserContext);
    createBeanDefEntry(ClusterInfo.class, compositeDef, refName, eleSource, parserContext);
 
    parserContext.registerComponent(compositeDef);
  } 
 
  /** 
   * Creates Bean Definitions for JMX components and adds them as a nested component. 
   * 
   * @param clazz the class type to register. 
   * @param compositeDef component that can hold nested components. 
   * @param refName the reference name to the couchbase client. 
   * @param eleSource source element to reference. 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	/** 
	 * Return a {@link CompositeComponentDefinition} for this element. 
	 * @return the composite component definition 
	 */ 
	public CompositeComponentDefinition getComponentDefinition() {
		return new CompositeComponentDefinition(this.element.getTagName(), this.source);
	} 
 
	/** 
	 * Create a new {@link RootBeanDefinition} with <tt>ROLE_INFRASTRUCTURE</tt> linked to the {@link #getSource() 
	 * source}. 
	 * @param beanClass the bean class to create 
	 * @return the bean definition 
	 */ 
	public RootBeanDefinition rootBeanDefinition(Class<?> beanClass) {
		return rootBeanDefinition(beanClass, BeanDefinition.ROLE_INFRASTRUCTURE);
	} 
 
	/** 
	 * Create a bew {@link RootBeanDefinition} with the specified <tt>role</tt> linked to the {@link #getSource() 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
  } 
 
  protected void registerJmxComponents(String databaseUrl, 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); 
      createBeanDefEntry(GlobalLockMetrics.class, compositeDef, mongoRefName, eleSource, parserContext); 
      createBeanDefEntry(MemoryMetrics.class, compositeDef, mongoRefName, eleSource, parserContext); 
      createBeanDefEntry(OperationCounters.class, compositeDef, mongoRefName, eleSource, parserContext); 
      */ 
    createBeanDefEntry(ServerInfo.class, compositeDef, databaseUrl, eleSource, parserContext);
    //createBeanDefEntry(MongoAdmin.class, compositeDef, mongoRefName, eleSource, parserContext); 
 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	} 
 
	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);
		createBeanDefEntry(GlobalLockMetrics.class, compositeDef, mongoRefName, eleSource, parserContext);
		createBeanDefEntry(MemoryMetrics.class, compositeDef, mongoRefName, eleSource, parserContext);
		createBeanDefEntry(OperationCounters.class, compositeDef, mongoRefName, eleSource, parserContext);
		createBeanDefEntry(ServerInfo.class, compositeDef, mongoRefName, eleSource, parserContext);
		createBeanDefEntry(MongoAdmin.class, compositeDef, mongoRefName, eleSource, parserContext);
 
		parserContext.registerComponent(compositeDef);
 
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
See Code Examples for Spring Framework CompositeComponentDefinition Methods: