package cz.cuni.amis.pogamut.base.utils;

public class PogamutJMX {
	
	/**
	 * Returns well formed JMX indentificator based on the domain / type / name.
	 * <p><p>
	 * Can be used to create ObjectName instance from javax.management package to identify
	 * the object inside MBeanServer.
	 * 
	 * @param jmxDomain
	 * @param type
	 * @param name
	 * @return
	 */
	public static String getJMXName(String jmxDomain, String type, String name) {
		if (name == null) return jmxDomain+":type="+type; 
		return jmxDomain+":type="+type+",name="+name;
	}

}
