1 17 18 package org.apache.geronimo.proxy; 19 20 import java.util.ArrayList ; 21 import java.util.Collections ; 22 import java.util.List ; 23 24 import org.apache.geronimo.core.service.Component; 25 import org.apache.geronimo.core.service.Container; 26 27 30 public class SimpleContainer extends SimpleComponent implements Container { 31 32 private ArrayList components = new ArrayList (); 33 34 37 public void addComponent(Component component) { 38 if (component == null) 39 throw new IllegalArgumentException ("component"); 40 41 components.add(component); 42 } 43 44 47 public List getComponents() { 48 return Collections.unmodifiableList(components); 49 } 50 51 54 public void removeComponent(Component component) throws Exception { 55 if (component == null) 56 throw new IllegalArgumentException ("component"); 57 components.remove(component); 58 } 59 60 } 61 | Popular Tags |