@Test public void testValidResourceType() throws MarshalException, ValidationException, IOException { String modifiedXml = m_xml.replaceFirst("ifIndex", "brocadeIndex").replaceFirst("<groups", m_brocadeXmlFragment + "<groups"); initDataCollectionFactory(modifiedXml); assertEquals(m_rrdRepository.getAbsolutePath(), DataCollectionConfigFactory.getInstance().getRrdPath()); assertEquals(0, DataCollectionConfigFactory.getInstance().getMibObjectList("default", ".1.9.9.9.9", "127.0.0.1", 0).size()); List<MibObject> mibObjects = DataCollectionConfigFactory.getInstance().getMibObjectList("default", ".1.3.6.1.4.1.200", "127.0.0.1", 0); MibObject first = mibObjects.remove(0); assertEquals("Invalid MibObject: " + first, "brocadeIndex", first.getInstance()); for (MibObject object : mibObjects) { assertEquals("Invalid MibObject: " + object, "ifIndex", object.getInstance()); } assertArrayEquals(new String[] {"brocadeIndex"}, DataCollectionConfigFactory.getInstance().getConfiguredResourceTypes().keySet().toArray(new String[0])); }
public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; } }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }  }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }  static void setInstance(DataCollectionConfigDao instance); static synchronized void init(); static synchronized void reload(); static synchronized DataCollectionConfigDao getInstance(); static void main(String[] args); }
DataCollectionConfigFactory { public static synchronized DataCollectionConfigDao getInstance() { if (m_singleton == null) throw new IllegalStateException("The factory has not been initialized"); return m_singleton; }  static void setInstance(DataCollectionConfigDao instance); static synchronized void init(); static synchronized void reload(); static synchronized DataCollectionConfigDao getInstance(); static void main(String[] args);  }