1 22 package org.jboss.management.j2ee; 23 24 import javax.management.MalformedObjectNameException ; 25 import javax.management.ObjectName ; 26 import java.security.InvalidParameterException ; 27 import java.util.ArrayList ; 28 import java.util.Arrays ; 29 import java.util.List ; 30 31 39 public abstract class J2EEModule extends J2EEDeployedObject 40 implements J2EEModuleMBean 41 { 42 44 private List mJVMs = new ArrayList (); 46 47 49 59 public J2EEModule(String pType, 60 String pName, 61 ObjectName pParent, 62 String [] pJVMs, 63 String pDeploymentDescriptor) 64 throws 65 MalformedObjectNameException , 66 InvalidParentException 67 { 68 super(pType, pName, pParent, pDeploymentDescriptor); 69 mJVMs = new ArrayList (Arrays.asList(pJVMs == null ? new String [0] : pJVMs)); 70 } 71 72 74 77 public String [] getjavaVMs() 78 { 79 return (String []) mJVMs.toArray(new String [mJVMs.size()]); 80 } 81 82 85 public String getjavaVM(int pIndex) 86 { 87 if (pIndex >= 0 && pIndex < mJVMs.size()) 88 { 89 return (String ) mJVMs.get(pIndex); 90 } 91 else 92 { 93 return null; 94 } 95 } 96 } 97 | Popular Tags |