Spring Framework MetadataNamingStrategy - 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 MetadataNamingStrategy class.

This code example shows how to use the following methods:setDefaultDomain
	 * (if the bean name follows the JMX ObjectName syntax); else, 
	 * the package name of the managed bean class. 
	 * @see MetadataNamingStrategy#setDefaultDomain 
	 */ 
	public void setDefaultDomain(String defaultDomain) {
		this.metadataNamingStrategy.setDefaultDomain(defaultDomain);
	} 
 
	@Override 
	public void setBeanFactory(BeanFactory beanFactory) {
		super.setBeanFactory(beanFactory);
		this.annotationSource.setBeanFactory(beanFactory);
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:getObjectName
This code example shows how to use the following methods:getObjectName
 
  @Override 
  public ObjectName getObjectName(Object managedBean, String beanKey) 
      throws MalformedObjectNameException { 
 
    ObjectName objName = super.getObjectName(managedBean, beanKey); 
 
    if (_servletName != null) { 
      String canonicalName = objName.getCanonicalName(); 
      canonicalName += ",application=" + ObjectName.quote(_servletName); 
      objName = ObjectNameManager.getInstance(canonicalName); 
    } 
 
    return objName; 
  } 
 
  @Override 
  public void setServletContext(ServletContext servletContext) { 
    _servletName = getContextPath(servletContext); 
  } 
4
CodeRank
This code example shows how to use the following methods:getObjectName
	} 
 
	@Override 
	public ObjectName getObjectName(Object managedBean, String beanKey)
			throws MalformedObjectNameException {
		ObjectName objectName = super.getObjectName(managedBean, beanKey);
		if (this.staticNameParts.length() == 0) {
			return objectName;
		} 
		return new ObjectName(objectName.getCanonicalName() + this.staticNameParts);
	} 
 
	/** 
	 * Static properties that will be added to all object names. 
	 *  
	 * @param objectNameStaticProperties the objectNameStaticProperties to set 
	 */ 
	public void setObjectNameStaticProperties(Map<String, String> objectNameStaticProperties) {
		StringBuilder builder = new StringBuilder();
		for (String key : objectNameStaticProperties.keySet()) {
4
CodeRank
This code example shows how to use the following methods:getObjectName
			String nameSuffix = ((InstanceAwareMBean)managedBean).getMBeanNameSuffix(managedBean, beanKey);
			if (nameSuffix != null) {
				return ObjectName.getInstance(super.getObjectName(managedBean, beanKey).toString() + nameSuffix);
			} 
		} 
		return super.getObjectName(managedBean, beanKey);
	} 
		 
} 
4
CodeRank
See Code Examples for Spring Framework MetadataNamingStrategy Methods: