public class DefaultDataSourceFactory extends AbstractObjectFactory<DataSource> implements DataSourceFactory
KEY_DEFAULT
Constructor and Description |
---|
DefaultDataSourceFactory(Configuration configuration,
GriffonApplication application) |
Modifier and Type | Method and Description |
---|---|
DataSource |
create(String name) |
void |
destroy(String name,
DataSource instance) |
Map<String,Object> |
getConfigurationFor(String dataSourceName) |
Set<String> |
getDataSourceNames() |
protected String |
getPluralKey() |
protected String |
getSingleKey() |
event, getApplication, getConfiguration, narrowConfig
@Inject public DefaultDataSourceFactory(@Nonnull @Named(value="datasource") Configuration configuration, @Nonnull GriffonApplication application)
@Nonnull public Set<String> getDataSourceNames()
getDataSourceNames
in interface DataSourceFactory
@Nonnull public Map<String,Object> getConfigurationFor(@Nonnull String dataSourceName)
getConfigurationFor
in interface DataSourceFactory
@Nonnull protected String getSingleKey()
getSingleKey
in class AbstractObjectFactory<DataSource>
@Nonnull protected String getPluralKey()
getPluralKey
in class AbstractObjectFactory<DataSource>
@Nonnull public DataSource create(@Nonnull String name)
create
in interface ObjectFactory<DataSource>
public void destroy(@Nonnull String name, @Nonnull DataSource instance)
destroy
in interface ObjectFactory<DataSource>