1 22 package org.jboss.test.system.controller.support; 23 24 import javax.management.Attribute ; 25 import javax.management.AttributeList ; 26 import javax.management.AttributeNotFoundException ; 27 import javax.management.DynamicMBean ; 28 import javax.management.InvalidAttributeValueException ; 29 import javax.management.MBeanAttributeInfo ; 30 import javax.management.MBeanException ; 31 import javax.management.MBeanInfo ; 32 import javax.management.ObjectName ; 33 import javax.management.ReflectionException ; 34 35 import org.jboss.mx.util.ObjectNameFactory; 36 import org.jboss.util.NotImplementedException; 37 38 44 public class BrokenDynamicMBeanAttributes implements DynamicMBean 45 { 46 public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.test:type=BrokenDynamicMBeanAttributes"); 47 48 public MBeanInfo getMBeanInfo() 49 { 50 return new BrokenMBeanInfoAttributes(); 51 } 52 53 public Object getAttribute(String attribute) throws AttributeNotFoundException , MBeanException , ReflectionException 54 { 55 throw new org.jboss.util.NotImplementedException("getAttribute"); 56 } 57 58 public AttributeList getAttributes(String [] attributes) 59 { 60 throw new NotImplementedException("getAttributes"); 61 } 62 63 public Object invoke(String actionName, Object [] params, String [] signature) throws MBeanException , ReflectionException 64 { 65 throw new NotImplementedException("invoke"); 66 } 67 68 public void setAttribute(Attribute attribute) throws AttributeNotFoundException , InvalidAttributeValueException , MBeanException , ReflectionException 69 { 70 throw new NotImplementedException("setAttribute"); 71 } 72 73 public AttributeList setAttributes(AttributeList attributes) 74 { 75 throw new NotImplementedException("setAttributes"); 76 } 77 78 private static class BrokenMBeanInfoAttributes extends MBeanInfo 79 { 80 private static final long serialVersionUID = 1158114004365977632L; 81 82 public BrokenMBeanInfoAttributes() throws IllegalArgumentException 83 { 84 super(BrokenDynamicMBeanAttributes.class.getName(), "Broken", null, null, null, null); 85 } 86 87 public MBeanAttributeInfo [] getAttributes() 88 { 89 throw new Error ("BROKEN"); 90 } 91 } 92 } 93 | Popular Tags |