use SigarInvokerJMX.PROP_TYPE

This commit is contained in:
Doug MacEachern 2008-10-09 06:38:11 +00:00
parent c7b398b53a
commit ed7562c0c7
4 changed files with 5 additions and 4 deletions

View File

@ -46,7 +46,8 @@ import org.hyperic.sigar.SigarProxyCache;
*/
public abstract class AbstractMBean implements DynamicMBean, MBeanRegistration {
protected static final String MBEAN_ATTR_TYPE = "type";
protected static final String MBEAN_DOMAIN = SigarInvokerJMX.DOMAIN_NAME;
protected static final String MBEAN_ATTR_TYPE = SigarInvokerJMX.PROP_TYPE;
protected static final short CACHED_30SEC = 0;

View File

@ -100,7 +100,7 @@ public class ReflectedMBean extends AbstractMBean {
super(sigar, CACHED_5SEC);
this.type = type;
this.name =
SigarInvokerJMX.DOMAIN_NAME + ":" +
MBEAN_DOMAIN + ":" +
MBEAN_ATTR_TYPE + "=" + getType();
}

View File

@ -146,7 +146,7 @@ public class SigarLoadAverage extends AbstractMBean {
super(sigar, CACHED_30SEC);
// all fine
this.objectName = SigarInvokerJMX.DOMAIN_NAME + ":" + MBEAN_ATTR_TYPE
this.objectName = MBEAN_DOMAIN + ":" + MBEAN_ATTR_TYPE
+ "=" + MBEAN_TYPE;
}

View File

@ -137,7 +137,7 @@ public class SigarRegistry extends AbstractMBean {
*/
public SigarRegistry() {
super(new Sigar(), CACHELESS);
this.objectName = SigarInvokerJMX.DOMAIN_NAME + ":" + MBEAN_ATTR_TYPE
this.objectName = MBEAN_DOMAIN + ":" + MBEAN_ATTR_TYPE
+ "=" + MBEAN_TYPE;
this.managedBeans = new ArrayList();
}