@Test public void testLoadConfigurationFromStream() throws Exception { XMLConfiguration config = MonetaConfiguration.loadConfigurationFromStream(new FileInputStream(testFile.getAbsolutePath())); Assert.assertTrue(config != null); Throwable exceptionThrown = null; try {config = MonetaConfiguration.loadConfigurationFromStream(null);} catch (Exception e) { exceptionThrown = e; } Assert.assertTrue(exceptionThrown != null); }
protected static final XMLConfiguration loadConfigurationFromStream( InputStream configurationStream) { XMLConfiguration config = new XMLConfiguration(); try { config.load(configurationStream); } catch (ConfigurationException e) { throw new MonetaException("Moneta configuration file not loaded from classpath", e) .addContextValue("configFileName", DEFAULT_CONFIGURATION_FILE_NAME); } finally { IOUtils.closeQuietly(configurationStream); } return config; }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromStream( InputStream configurationStream) { XMLConfiguration config = new XMLConfiguration(); try { config.load(configurationStream); } catch (ConfigurationException e) { throw new MonetaException("Moneta configuration file not loaded from classpath", e) .addContextValue("configFileName", DEFAULT_CONFIGURATION_FILE_NAME); } finally { IOUtils.closeQuietly(configurationStream); } return config; } }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromStream( InputStream configurationStream) { XMLConfiguration config = new XMLConfiguration(); try { config.load(configurationStream); } catch (ConfigurationException e) { throw new MonetaException("Moneta configuration file not loaded from classpath", e) .addContextValue("configFileName", DEFAULT_CONFIGURATION_FILE_NAME); } finally { IOUtils.closeQuietly(configurationStream); } return config; } MonetaConfiguration();  MonetaConfiguration(InputStream configurationStream); }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromStream( InputStream configurationStream) { XMLConfiguration config = new XMLConfiguration(); try { config.load(configurationStream); } catch (ConfigurationException e) { throw new MonetaException("Moneta configuration file not loaded from classpath", e) .addContextValue("configFileName", DEFAULT_CONFIGURATION_FILE_NAME); } finally { IOUtils.closeQuietly(configurationStream); } return config; } MonetaConfiguration();  MonetaConfiguration(InputStream configurationStream); Connection getConnection(String sourceName); Topic getTopic(String topicName); Topic findByPlural(String pluralTopicName); List<Topic> getTopicList(); MonetaDataSource getMonetaDataSource(String sourceName); String[] getIgnoredContextPathNodes(); void setIgnoredContextPathNodes(String[] ignoredContextPathNodes); Map<String, HealthCheck> getHealthChecks(); }
MonetaConfiguration { protected static final XMLConfiguration loadConfigurationFromStream( InputStream configurationStream) { XMLConfiguration config = new XMLConfiguration(); try { config.load(configurationStream); } catch (ConfigurationException e) { throw new MonetaException("Moneta configuration file not loaded from classpath", e) .addContextValue("configFileName", DEFAULT_CONFIGURATION_FILE_NAME); } finally { IOUtils.closeQuietly(configurationStream); } return config; } MonetaConfiguration();  MonetaConfiguration(InputStream configurationStream); Connection getConnection(String sourceName); Topic getTopic(String topicName); Topic findByPlural(String pluralTopicName); List<Topic> getTopicList(); MonetaDataSource getMonetaDataSource(String sourceName); String[] getIgnoredContextPathNodes(); void setIgnoredContextPathNodes(String[] ignoredContextPathNodes); Map<String, HealthCheck> getHealthChecks(); static final String MONETA_CONFIGURATION_PROPERTY; static final String DEFAULT_CONFIGURATION_FILE_NAME; }