1 22 package org.jboss.mx.server.registry; 23 24 import java.util.Map ; 25 26 import javax.management.ObjectName ; 27 28 import org.jboss.mx.server.MBeanInvoker; 29 import org.jboss.mx.server.ServerConstants; 30 31 40 public class MBeanEntry 41 implements ServerConstants 42 { 43 45 48 private ObjectName objectName = null; 49 50 53 private String resourceClassName = null; 54 55 58 private MBeanInvoker invoker = null; 59 60 63 private Object resource = null; 64 65 68 private ClassLoader cl = null; 69 70 73 private Map valueMap = null; 74 75 77 85 public MBeanEntry(ObjectName objectName, MBeanInvoker invoker, 86 Object resource, Map valueMap) 87 { 88 this.objectName = objectName; 89 this.invoker = invoker; 90 this.resourceClassName = resource.getClass().getName(); 91 this.resource = resource; 92 this.valueMap = valueMap; 93 94 if (valueMap != null) 96 this.cl = (ClassLoader ) valueMap.get(CLASSLOADER); 97 } 98 99 101 106 public ObjectName getObjectName() 107 { 108 return objectName; 109 } 110 111 117 protected void setObjectName(ObjectName objectName) 118 { 119 this.objectName = objectName; 120 } 121 122 127 public MBeanInvoker getInvoker() 128 { 129 return invoker; 130 } 131 132 137 public String getResourceClassName() 138 { 139 return resourceClassName; 140 } 141 142 147 public void setResourceClassName(String resourceClassName) 148 { 149 this.resourceClassName = resourceClassName; 150 } 151 152 157 public Object getResourceInstance() 158 { 159 return resource; 160 } 161 162 167 public ClassLoader getClassLoader() 168 { 169 return cl; 170 } 171 172 178 public Object getValue(String key) 179 { 180 if (valueMap != null) 181 return valueMap.get(key); 182 return null; 183 } 184 } 185 | Popular Tags |