@Test public void testGetConnectionAdapter() { registry.init(); registry.registerConnectionAdapter(conn, features); Assert.assertEquals("Wrong map", conn, registry.getConnectionAdapter(1L)); }
public synchronized ConnectionAdapter getConnectionAdapter(Long datapathId) throws NullPointerException { for (ConnectionAdapter conn : connectionAdapterMap.keySet()) { if (connectionAdapterMap.get(conn).getDatapathId().longValue() == datapathId) { return conn; } } return null; }
ConnectionAdaptersRegistry { public synchronized ConnectionAdapter getConnectionAdapter(Long datapathId) throws NullPointerException { for (ConnectionAdapter conn : connectionAdapterMap.keySet()) { if (connectionAdapterMap.get(conn).getDatapathId().longValue() == datapathId) { return conn; } } return null; } }
ConnectionAdaptersRegistry { public synchronized ConnectionAdapter getConnectionAdapter(Long datapathId) throws NullPointerException { for (ConnectionAdapter conn : connectionAdapterMap.keySet()) { if (connectionAdapterMap.get(conn).getDatapathId().longValue() == datapathId) { return conn; } } return null; }  }
ConnectionAdaptersRegistry { public synchronized ConnectionAdapter getConnectionAdapter(Long datapathId) throws NullPointerException { for (ConnectionAdapter conn : connectionAdapterMap.keySet()) { if (connectionAdapterMap.get(conn).getDatapathId().longValue() == datapathId) { return conn; } } return null; }  synchronized void init(); synchronized void setConnectionAdapterMap(HashMap<ConnectionAdapter, GetFeaturesOutput> map); synchronized void registerConnectionAdapter(ConnectionAdapter connectionAdapter,
            GetFeaturesOutput datapathID); synchronized GetFeaturesOutput getFeaturesOutput(ConnectionAdapter connectionAdapter); synchronized BigInteger getDatapathID(ConnectionAdapter connectionAdapter); synchronized ConnectionAdapter getConnectionAdapter(Long datapathId); Set<ConnectionAdapter> getConnectionAdapters(); synchronized boolean removeConnectionAdapter(ConnectionAdapter conn); }
ConnectionAdaptersRegistry { public synchronized ConnectionAdapter getConnectionAdapter(Long datapathId) throws NullPointerException { for (ConnectionAdapter conn : connectionAdapterMap.keySet()) { if (connectionAdapterMap.get(conn).getDatapathId().longValue() == datapathId) { return conn; } } return null; }  synchronized void init(); synchronized void setConnectionAdapterMap(HashMap<ConnectionAdapter, GetFeaturesOutput> map); synchronized void registerConnectionAdapter(ConnectionAdapter connectionAdapter,
            GetFeaturesOutput datapathID); synchronized GetFeaturesOutput getFeaturesOutput(ConnectionAdapter connectionAdapter); synchronized BigInteger getDatapathID(ConnectionAdapter connectionAdapter); synchronized ConnectionAdapter getConnectionAdapter(Long datapathId); Set<ConnectionAdapter> getConnectionAdapters(); synchronized boolean removeConnectionAdapter(ConnectionAdapter conn);  }