@Test public void testYamlReference() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (OutputStreamWriter writer = new OutputStreamWriter(baos, StandardCharsets.UTF_8)) { writer.write("commonSsl: &ssl\n"); writer.write(" keyStore:\n"); writer.write(" location: /ks\n"); writer.write(" password: secret\n"); writer.write("server:\n"); writer.write(" ssl: *ssl\n"); writer.write("storage:\n"); writer.write(" ssl: *ssl\n"); } try (InputStream input = new ByteArrayInputStream(baos.toByteArray())) { WaltzServerConfig config = new WaltzServerConfig(new Yaml().load(input)); SSLConfig sslConfig; sslConfig = config.getSSLConfig(); assertEquals("/ks", sslConfig.get(SSLConfig.KEY_STORE_LOCATION)); assertEquals("secret", sslConfig.get(SSLConfig.KEY_STORE_PASSWORD)); sslConfig = config.getSSLConfig(); assertEquals("/ks", sslConfig.get(SSLConfig.KEY_STORE_LOCATION)); assertEquals("secret", sslConfig.get(SSLConfig.KEY_STORE_PASSWORD)); } }
public SSLConfig getSSLConfig() { return new SSLConfig(configPrefix + SERVER_SSL_CONFIG_PREFIX, configValues); }
WaltzServerConfig extends AbstractConfig { public SSLConfig getSSLConfig() { return new SSLConfig(configPrefix + SERVER_SSL_CONFIG_PREFIX, configValues); } }
WaltzServerConfig extends AbstractConfig { public SSLConfig getSSLConfig() { return new SSLConfig(configPrefix + SERVER_SSL_CONFIG_PREFIX, configValues); } WaltzServerConfig(Map<Object, Object> configValues);  WaltzServerConfig(String configPrefix, Map<Object, Object> configValues); }
WaltzServerConfig extends AbstractConfig { public SSLConfig getSSLConfig() { return new SSLConfig(configPrefix + SERVER_SSL_CONFIG_PREFIX, configValues); } WaltzServerConfig(Map<Object, Object> configValues);  WaltzServerConfig(String configPrefix, Map<Object, Object> configValues); SSLConfig getSSLConfig(); GraphiteReporterConfig getGraphiteReporterConfig(); }
WaltzServerConfig extends AbstractConfig { public SSLConfig getSSLConfig() { return new SSLConfig(configPrefix + SERVER_SSL_CONFIG_PREFIX, configValues); } WaltzServerConfig(Map<Object, Object> configValues);  WaltzServerConfig(String configPrefix, Map<Object, Object> configValues); SSLConfig getSSLConfig(); GraphiteReporterConfig getGraphiteReporterConfig(); static final String ZOOKEEPER_CONNECT_STRING; static final String ZOOKEEPER_SESSION_TIMEOUT; static final String CLUSTER_ROOT; static final String SERVER_PORT; static final String SERVER_REGION; static final String SERVER_SSL_CONFIG_PREFIX; static final String GRAPHITE_REPORTER_CONFIG_PREFIX; static final String OPTIMISTIC_LOCK_TABLE_SIZE; static final int DEFAULT_OPTIMISTIC_LOCK_TABLE_SIZE; static final String FEED_CACHE_SIZE; static final int DEFAULT_FEED_CACHE_SIZE; static final String MIN_FETCH_SIZE; static final int DEFAULT_MIN_FETCH_SIZE; static final String REALTIME_THRESHOLD; static final int DEFAULT_REALTIME_THRESHOLD; static final String TRANSACTION_DATA_CACHE_SIZE; static final int DEFAULT_TRANSACTION_DATA_CACHE_SIZE; static final String TRANSACTION_DATA_CACHE_ALLOCATION; static final String DEFAULT_TRANSACTION_DATA_CACHE_ALLOCATION; static final String MAX_BATCH_SIZE; static final int DEFAULT_MAX_BATCH_SIZE; static final String INITIAL_RETRY_INTERVAL; static final long DEFAULT_INITIAL_RETRY_INTERVAL; static final String MAX_RETRY_INTERVAL; static final long DEFAULT_MAX_RETRY_INTERVAL; static final String CHECKPOINT_INTERVAL; static final int DEFAULT_CHECKPOINT_INTERVAL; static final String SERVER_JETTY_PORT; }