public final class DataSourceFactory extends Object
DataSource
objects as configured in INI files.Constructor and Description |
---|
DataSourceFactory(DatasourceOptions options,
com.google.common.collect.ImmutableList<String> iniFilePaths) |
Modifier and Type | Method and Description |
---|---|
DataSource |
getDataSource(String name)
Construct
DataSource |
com.google.common.collect.ImmutableList<String> |
getNames() |
public DataSourceFactory(DatasourceOptions options, com.google.common.collect.ImmutableList<String> iniFilePaths) throws InvalidDataSourceException
options
- for proxy configurationiniFilePaths
- path to INI file to load the data source config fromInvalidDataSourceException
- on problems with the data source config filepublic com.google.common.collect.ImmutableList<String> getNames()
public DataSource getDataSource(String name) throws InvalidDataSourceException
DataSource
name
- key of the INI section to load the data source fromDataSource
with data from the fileInvalidDataSourceException
- if name
could not be found in any data source config fileCopyright © 2016. All rights reserved.