1 22 package org.jboss.console.manager.interfaces.impl; 23 24 import org.jboss.console.manager.interfaces.ManageableResource; 25 26 import javax.management.ObjectName ; 27 28 43 44 public class MBeanResource 45 implements ManageableResource 46 { 47 48 50 52 String className = null; 53 ObjectName oj = null; 54 transient Object mbean = null; 56 58 60 public MBeanResource () {} 61 62 public MBeanResource (ObjectName oj, String clazz) 63 { 64 this.oj = oj; 65 this.className = clazz; 66 } 67 68 public MBeanResource (ObjectName oj, String clazz, Object proxy) 69 { 70 this.oj = oj; 71 this.className = clazz; 72 this.mbean = proxy; 73 } 74 75 77 public String getClassName () 78 { 79 return this.className; 80 } 81 82 public ObjectName getObjectName () 83 { 84 return this.oj; 85 } 86 87 public Object getMBeanProxy () 88 { 89 return this.mbean; 90 } 91 92 94 public String getId () 95 { 96 return this.oj.toString (); 97 } 98 99 101 public boolean equals (Object other) 102 { 103 if (other instanceof MBeanResource) 104 return this.oj.equals (((MBeanResource)other).oj); 105 else 106 return false; 107 } 108 109 111 113 115 117 } 118 | Popular Tags |