diff --git a/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java b/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java index 9d22f2c5..691a9550 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java @@ -22,7 +22,6 @@ import javax.management.Attribute; import javax.management.AttributeList; import javax.management.AttributeNotFoundException; import javax.management.DynamicMBean; -import javax.management.InvalidAttributeValueException; import javax.management.MBeanException; import javax.management.MBeanRegistration; import javax.management.MBeanServer; @@ -202,12 +201,6 @@ public abstract class AbstractMBean implements DynamicMBean, MBeanRegistration { result.add(next); } catch (AttributeNotFoundException e) { // ignore, as we cannot throw this exception - } catch (InvalidAttributeValueException e) { - // ignore, as we cannot throw this exception - } catch (MBeanException e) { - // ignore, as we cannot throw this exception - } catch (ReflectionException e) { - // ignore, as we cannot throw this exception } } return result; @@ -233,7 +226,7 @@ public abstract class AbstractMBean implements DynamicMBean, MBeanRegistration { } /** - * Empty implementation, allowing aubclasses to ignore the interface. + * Empty implementation, allowing subclasses to ignore the interface. * *
Note: Make sure any subclass does a super call to this method, * otherwise the implementation might be broken.
@@ -244,7 +237,7 @@ public abstract class AbstractMBean implements DynamicMBean, MBeanRegistration { } /** - * Empty implementation, allowing aubclasses to ignore the interface. + * Empty implementation, allowing subclasses to ignore the interface. * *Note: Make sure any subclass does a super call to this method, * otherwise the implementation might be broken.
@@ -255,7 +248,7 @@ public abstract class AbstractMBean implements DynamicMBean, MBeanRegistration { } /** - * Empty implementation, allowing aubclasses to ignore the interface. + * Empty implementation, allowing subclasses to ignore the interface. * *Note: Make sure any subclass does a super call to this method, * otherwise the implementation might be broken.
@@ -265,4 +258,15 @@ public abstract class AbstractMBean implements DynamicMBean, MBeanRegistration { public void postDeregister() { this.mbeanServer = null; } + + public void setAttribute(Attribute attr) throws AttributeNotFoundException { + throw new AttributeNotFoundException(attr.getName()); + } + + public Object invoke(String name, Object[] params, String[] signature) + throws ReflectionException { + + throw new ReflectionException(new NoSuchMethodException(name), + name); + } } diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarCpu.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarCpu.java index f1f6453a..d2b311fb 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarCpu.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarCpu.java @@ -18,13 +18,11 @@ package org.hyperic.sigar.jmx; -import javax.management.Attribute; import javax.management.AttributeNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanConstructorInfo; import javax.management.MBeanInfo; import javax.management.MBeanParameterInfo; -import javax.management.ReflectionException; import org.hyperic.sigar.Sigar; import org.hyperic.sigar.SigarException; @@ -303,26 +301,6 @@ public class SigarCpu extends AbstractMBean { } } - /* - * (non-Javadoc) - * - * @see DynamicMBean#setAttribute(Attribute) - */ - public void setAttribute(Attribute attr) throws AttributeNotFoundException { - throw new AttributeNotFoundException(attr.getName()); - } - - /* - * (non-Javadoc) - * - * @see DynamicMBean#invoke(String, Object[], String[]) - */ - public Object invoke(String actionName, Object[] params, String[] signature) - throws ReflectionException { - throw new ReflectionException(new NoSuchMethodException(actionName), - actionName); - } - /* * (non-Javadoc) * diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuInfo.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuInfo.java index 500ebed1..704f78af 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuInfo.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuInfo.java @@ -18,13 +18,11 @@ package org.hyperic.sigar.jmx; -import javax.management.Attribute; import javax.management.AttributeNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanConstructorInfo; import javax.management.MBeanInfo; import javax.management.MBeanParameterInfo; -import javax.management.ReflectionException; import org.hyperic.sigar.Sigar; import org.hyperic.sigar.SigarException; @@ -258,24 +256,6 @@ public class SigarCpuInfo extends AbstractMBean { } } - /* - * (non-Javadoc) - * @see DynamicMBean#setAttribute(Attribute) - */ - public void setAttribute(Attribute attr) throws AttributeNotFoundException { - throw new AttributeNotFoundException(attr.getName()); - } - - /* - * (non-Javadoc) - * @see DynamicMBean#invoke(String, Object[], String[]) - */ - public Object invoke(String actionName, Object[] params, String[] signature) - throws ReflectionException { - throw new ReflectionException(new NoSuchMethodException(actionName), - actionName); - } - /* * (non-Javadoc) * @see DynamicMBean#getMBeanInfo() diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuPerc.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuPerc.java index f53682b2..9ccdf3ac 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuPerc.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarCpuPerc.java @@ -18,13 +18,11 @@ package org.hyperic.sigar.jmx; -import javax.management.Attribute; import javax.management.AttributeNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanConstructorInfo; import javax.management.MBeanInfo; import javax.management.MBeanParameterInfo; -import javax.management.ReflectionException; import org.hyperic.sigar.Sigar; import org.hyperic.sigar.SigarException; @@ -305,24 +303,6 @@ public class SigarCpuPerc extends AbstractMBean { } } - /* - * (non-Javadoc) - * @see DynamicMBean#setAttribute(Attribute) - */ - public void setAttribute(Attribute attr) throws AttributeNotFoundException { - throw new AttributeNotFoundException(attr.getName()); - } - - /* - * (non-Javadoc) - * @see DynamicMBean#invoke(String, Object[], String[]) - */ - public Object invoke(String actionName, Object[] params, String[] signature) - throws ReflectionException { - throw new ReflectionException(new NoSuchMethodException(actionName), - actionName); - } - /* * (non-Javadoc) * @see DynamicMBean#getMBeanInfo() diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarMem.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarMem.java index bf7c1ea3..d9634575 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarMem.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarMem.java @@ -18,7 +18,6 @@ package org.hyperic.sigar.jmx; -import javax.management.Attribute; import javax.management.AttributeNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanConstructorInfo; @@ -222,25 +221,6 @@ public class SigarMem extends AbstractMBean { } } - /* - * (non-Javadoc) - * @see javax.management.DynamicMBean#setAttribute(javax.management.Attribute) - */ - public void setAttribute(Attribute attr) throws AttributeNotFoundException { - throw new AttributeNotFoundException(attr.getName()); - } - - /* - * (non-Javadoc) - * @see javax.management.DynamicMBean#invoke(java.lang.String, - * java.lang.Object[], java.lang.String[]) - */ - public Object invoke(String actionName, Object[] params, String[] signature) - throws ReflectionException { - throw new ReflectionException(new NoSuchMethodException(actionName), - actionName); - } - /* * (non-Javadoc) * @see javax.management.DynamicMBean#getMBeanInfo() diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java index 6ec42856..45edcc75 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java @@ -23,17 +23,14 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; -import javax.management.Attribute; import javax.management.AttributeNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanConstructorInfo; -import javax.management.MBeanException; import javax.management.MBeanInfo; import javax.management.MBeanParameterInfo; import javax.management.MBeanServer; import javax.management.ObjectInstance; import javax.management.ObjectName; -import javax.management.ReflectionException; import org.hyperic.sigar.Sigar; import org.hyperic.sigar.SigarException; @@ -182,26 +179,6 @@ public class SigarRegistry extends AbstractMBean { return obj; } - /* (non-Javadoc) - * @see javax.management.DynamicMBean#setAttribute(javax.management.Attribute) - */ - public void setAttribute(Attribute attr) throws AttributeNotFoundException { - throw new AttributeNotFoundException(attr.getName()); - } - - /* (non-Javadoc) - * @see javax.management.DynamicMBean#invoke(java.lang.String, java.lang.Object[], java.lang.String[]) - */ - public Object invoke(String action, Object[] params, String[] signatures) - throws MBeanException, ReflectionException { - -/* if (MBEAN_OPER_LISTPROCESSES.getName().equals(action)) - return listProcesses(); - - else */ - throw new ReflectionException(new NoSuchMethodException(action), action); - } - /* (non-Javadoc) * @see javax.management.DynamicMBean#getMBeanInfo() */ diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarSwap.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarSwap.java index c209d32f..75fea1c9 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarSwap.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarSwap.java @@ -18,7 +18,6 @@ package org.hyperic.sigar.jmx; -import javax.management.Attribute; import javax.management.AttributeNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanConstructorInfo; @@ -170,25 +169,6 @@ public class SigarSwap extends AbstractMBean { } } - /* - * (non-Javadoc) - * @see javax.management.DynamicMBean#setAttribute(javax.management.Attribute) - */ - public void setAttribute(Attribute attr) throws AttributeNotFoundException { - throw new AttributeNotFoundException(attr.getName()); - } - - /* - * (non-Javadoc) - * @see javax.management.DynamicMBean#invoke(java.lang.String, - * java.lang.Object[], java.lang.String[]) - */ - public Object invoke(String actionName, Object[] params, String[] signature) - throws ReflectionException { - throw new ReflectionException(new NoSuchMethodException(actionName), - actionName); - } - /* * (non-Javadoc) * @see javax.management.DynamicMBean#getMBeanInfo()