1 package example; 2 3 import javax.management.ObjectName ; 4 import javax.management.MBeanServer ; 5 import javax.management.MBeanRegistration ; 6 7 11 public class Test implements TestMBean, MBeanRegistration { 12 15 private ObjectName _name; 16 17 20 public ObjectName getObjectName() 21 { 22 return _name; 23 } 24 25 33 public ObjectName preRegister(MBeanServer server, ObjectName name) 34 throws Exception 35 { 36 _name = name; 37 38 return name; 39 } 40 41 46 public void postRegister(Boolean registrationDone) 47 { 48 } 49 50 53 public void preDeregister() 54 throws Exception 55 { 56 } 57 58 61 public void postDeregister() 62 { 63 } 64 65 68 public String toString() 69 { 70 return "Test[" + _name + "]"; 71 } 72 } 73 | Popular Tags |