1 25 26 package org.objectweb.jonas.jmx; 27 28 import javax.management.ObjectName ; 29 30 36 public class CatalinaObjectName { 37 38 public static ObjectName catalinaServer() { 39 try { 40 return ObjectName.getInstance("Catalina:type=Server"); 41 } 42 catch (javax.management.MalformedObjectNameException e) { 43 return null; 45 } 46 } 47 48 public static ObjectName catalinaServices() { 49 try { 50 return ObjectName.getInstance("*:type=Service,*"); 51 } 52 catch (javax.management.MalformedObjectNameException e) { 53 return null; 55 } 56 } 57 58 public static ObjectName catalinaServices(String p_Domain) { 59 try { 60 return ObjectName.getInstance(p_Domain + ":type=Service, *"); 61 } 62 catch (javax.management.MalformedObjectNameException e) { 63 return null; 65 } 66 } 67 68 public static ObjectName catalinaService(String p_Domain, String p_ServiceName) { 69 try { 70 return ObjectName.getInstance(p_Domain + ":type=Service,name=" + p_ServiceName); 71 } 72 catch (javax.management.MalformedObjectNameException e) { 73 return null; 75 } 76 } 77 78 public static ObjectName catalinaEngines() { 79 try { 80 return ObjectName.getInstance("*:type=Engine"); 81 } 82 catch (javax.management.MalformedObjectNameException e) { 83 return null; 85 } 86 } 87 88 public static ObjectName catalinaEngine(String p_Domain) { 89 try { 90 return ObjectName.getInstance(p_Domain + ":type=Engine"); 91 } 92 catch (javax.management.MalformedObjectNameException e) { 93 return null; 95 } 96 } 97 98 public static ObjectName catalinaConnectors() { 99 try { 100 return ObjectName.getInstance("*:type=Connector"); 101 } 102 catch (javax.management.MalformedObjectNameException e) { 103 return null; 105 } 106 } 107 108 public static ObjectName catalinaConnectors(String p_Domain) { 109 try { 110 return ObjectName.getInstance(p_Domain + ":type=Connector,*"); 111 } 112 catch (javax.management.MalformedObjectNameException e) { 113 return null; 115 } 116 } 117 118 public static ObjectName catalinaConnector(String p_Domain, String p_Port) { 119 try { 120 return ObjectName.getInstance(p_Domain + ":type=Connector,port=" + p_Port); 121 } 122 catch (javax.management.MalformedObjectNameException e) { 123 return null; 125 } 126 } 127 128 public static ObjectName catalinaHosts() { 129 try { 130 return ObjectName.getInstance("*:type=Host,*"); 131 } 132 catch (javax.management.MalformedObjectNameException e) { 133 return null; 135 } 136 } 137 138 public static ObjectName catalinaHosts(String p_Domain) { 139 try { 140 return ObjectName.getInstance(p_Domain + ":type=Host,*"); 141 } 142 catch (javax.management.MalformedObjectNameException e) { 143 return null; 145 } 146 } 147 148 public static ObjectName catalinaHost(String p_Domain, String p_HostName) { 149 try { 150 return ObjectName.getInstance(p_Domain + ":type=Host,host=" + p_HostName); 151 } 152 catch (javax.management.MalformedObjectNameException e) { 153 return null; 155 } 156 } 157 158 public static ObjectName catalinaFactory() { 159 try { 160 return ObjectName.getInstance("Catalina:type=MBeanFactory"); 161 } 162 catch (javax.management.MalformedObjectNameException e) { 163 return null; 165 } 166 } 167 168 public static ObjectName catalinaRealms() { 169 try { 170 return ObjectName.getInstance("*:type=Realm,*"); 171 } 172 catch (javax.management.MalformedObjectNameException e) { 173 return null; 175 } 176 } 177 178 public static ObjectName catalinaRealm(String p_Domain) { 179 try { 180 return ObjectName.getInstance(p_Domain + ":type=Realm"); 181 } 182 catch (javax.management.MalformedObjectNameException e) { 183 return null; 185 } 186 } 187 188 public static ObjectName catalinaManager(String p_ServiceName, String p_Host, String p_Path) { 189 try { 190 return ObjectName.getInstance("Catalina:type=Manager,service=" + p_ServiceName + ",host=" 191 + p_Host + ",path=" + p_Path); 192 } 193 catch (javax.management.MalformedObjectNameException e) { 194 return null; 196 } 197 } 198 199 public static ObjectName catalinaLoader(String p_ServiceName, String p_Host, String p_Path) { 200 try { 201 return ObjectName.getInstance("Catalina:type=Loader,service=" + p_ServiceName + ",host=" 202 + p_Host + ",path=" + p_Path); 203 } 204 catch (javax.management.MalformedObjectNameException e) { 205 return null; 207 } 208 } 209 210 public static ObjectName catalinaValves() { 211 try { 212 return ObjectName.getInstance("*:type=Valve,*"); 213 } 214 catch (javax.management.MalformedObjectNameException e) { 215 return null; 217 } 218 } 219 220 public static ObjectName catalinaValves(String p_Domain) { 221 try { 222 return ObjectName.getInstance(p_Domain + ":type=Valve,*"); 223 } 224 catch (javax.management.MalformedObjectNameException e) { 225 return null; 227 } 228 } 229 public static ObjectName catalinaAccessLogValves(String p_Domain) { 230 try { 231 return ObjectName.getInstance(p_Domain + ":type=Valve,name=AccessLogValve,*"); 232 } 233 catch (javax.management.MalformedObjectNameException e) { 234 return null; 236 } 237 } 238 239 public static ObjectName catalinaValves(String p_Domain, String p_Host) { 240 try { 241 return ObjectName.getInstance(p_Domain + ":type=Valve,host=" + p_Host + ",*"); 242 } 243 catch (javax.management.MalformedObjectNameException e) { 244 return null; 246 } 247 } 248 249 public static ObjectName catalinaValve(String p_Domain, String p_Name) { 250 try { 251 return ObjectName.getInstance(p_Domain + ":type=Valve,name=" + p_Name); 252 } 253 catch (javax.management.MalformedObjectNameException e) { 254 return null; 256 } 257 } 258 259 public static ObjectName catalinaValve(String p_Domain, String p_Name, String p_Host) { 260 try { 261 return ObjectName.getInstance(p_Domain + ":type=Valve,name=" + p_Name + ",host=" + p_Host); 262 } 263 catch (javax.management.MalformedObjectNameException e) { 264 return null; 266 } 267 } 268 269 } 270 | Popular Tags |