1 26 27 package org.objectweb.openccm.pss.runtime.common.lib; 28 29 30 38 39 public class ConnectorRegistry 40 extends org.omg.CORBA.LocalObject 41 implements org.omg.CosPersistentState.ConnectorRegistry 42 { 43 49 52 protected java.util.Map _connectors; 53 54 60 63 public ConnectorRegistry() 64 { 65 _connectors = new java.util.HashMap (); 66 } 67 68 74 80 86 89 public org.omg.CosPersistentState.Connector 90 find_connector(String implementation_id) 91 throws org.omg.CosPersistentState.NotFound 92 { 93 org.omg.CosPersistentState.Connector connector = null; 94 95 connector = (org.omg.CosPersistentState.Connector) _connectors.get(implementation_id.toLowerCase()); 96 if (connector == null) 97 throw new org.omg.CosPersistentState.NotFound(); 98 return connector; 99 } 100 101 104 public void 105 register_connector(org.omg.CosPersistentState.Connector c) 106 { 107 _connectors.put(c.implementation_id().toLowerCase(), c); 108 } 109 110 113 public void 114 unregister_connector(String implementation_id) 115 throws org.omg.CosPersistentState.NotFound 116 { 117 org.omg.CosPersistentState.Connector connector = null; 118 119 connector = (org.omg.CosPersistentState.Connector) _connectors.remove(implementation_id.toLowerCase()); 120 121 if (connector == null) 122 throw new org.omg.CosPersistentState.NotFound(); 123 } 124 } 125 | Popular Tags |