1 5 package ve.luz.ica.jackass.component; 6 7 import java.util.Hashtable ; 8 import java.util.Map ; 9 10 13 23 public final class ComponentInfoManager 24 { 25 27 private static ComponentInfoManager manager = null; 28 29 private Map components; 30 31 35 public static ComponentInfoManager getManager() 36 { 37 if (manager == null) 38 { 39 manager = new ComponentInfoManager(); 40 } 41 return manager; 42 } 43 44 47 private ComponentInfoManager() 48 { 49 components = new Hashtable (); 50 } 51 52 57 public void addComponentInfo(byte[] oid, ComponentInfo info) 58 { 59 this.components.put(new String (oid), info); 60 } 61 62 67 public ComponentInfo getComponentInfo(byte[] oid) 68 { 69 ComponentInfo compInfo = (ComponentInfo) this.components.get(new String (oid)); 70 return compInfo; 71 } 72 73 77 public void removeComponentInfo(byte[] oid) 78 { 79 components.remove(new String (oid)); 80 } 81 } 82 | Popular Tags |