1 23 24 package com.sun.enterprise.management.model; 25 26 27 import java.util.*; 28 import javax.management.*; 29 import com.sun.enterprise.management.util.J2EEModuleCallBack; 30 31 public class WebModuleMdl extends J2EEModuleMdl { 32 33 private static String MANAGED_OBJECT_TYPE = "WebModule"; 34 35 private String webModuleName = null; 36 private String applicationName = null; 37 public WebModuleMdl(J2EEModuleCallBack module) { 38 super(module); 39 this.webModuleName = module.getName(); 40 this.applicationName = module.getParentName(); 41 if(isStandAloneModule(applicationName)) 42 this.applicationName = "null"; 43 } 44 45 public String [] getservlets() { 46 Set appMods = findNames("j2eeType=Servlet,WebModule=" +this.webModuleName+",J2EEServer=" + getJ2EEServer()+",J2EEApplication="+this.applicationName); 48 49 Iterator it = appMods.iterator(); 50 String [] mods = new String [appMods.size()]; 51 int i =0; 52 while(it.hasNext()) { 53 mods[i++] = ((ObjectName)it.next()).toString(); 54 } 55 return mods; 56 } 57 58 61 public String getj2eeType() { 62 return MANAGED_OBJECT_TYPE; 63 } 64 65 66 public String getJ2EEApplication() { 67 return this.applicationName; 68 } 69 70 public String getModuleName() { 71 return this.webModuleName; 72 } 73 74 } 75 | Popular Tags |