Class DataSourceRepositoryManager
- java.lang.Object
-
- org.apache.synapse.commons.datasource.DataSourceRepositoryManager
-
- All Implemented Interfaces:
DataSourceInformationRepositoryListener
public class DataSourceRepositoryManager extends Object implements DataSourceInformationRepositoryListener
Manages data sources defined in the synapse. This is an observer of the DataSourceInformationRepository
-
-
Constructor Summary
Constructors Constructor Description DataSourceRepositoryManager(InMemoryDataSourceRepository inMemoryDataSourceRepository, JNDIBasedDataSourceRepository jndiBasedDataSourceRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDataSourceInformation(DataSourceInformation dataSourceInformation)Event when adding a DataSourceInformationvoidclear()Clear all DataSource RepositoriesDataSourcegetDataSource(String name)Find a DataSource using given namevoidreConfigure(Properties confProperties)Event when re-configuring the DataSourceInformationRepositoryvoidremoveDataSourceInformation(DataSourceInformation dataSourceInformation)Event when removing a DataSourceInformation instance
-
-
-
Constructor Detail
-
DataSourceRepositoryManager
public DataSourceRepositoryManager(InMemoryDataSourceRepository inMemoryDataSourceRepository, JNDIBasedDataSourceRepository jndiBasedDataSourceRepository)
-
-
Method Detail
-
getDataSource
public DataSource getDataSource(String name)
Find a DataSource using given name- Parameters:
name- Name of the DataSource to be found- Returns:
- DataSource if found , otherwise null
-
addDataSourceInformation
public void addDataSourceInformation(DataSourceInformation dataSourceInformation)
Description copied from interface:DataSourceInformationRepositoryListenerEvent when adding a DataSourceInformation- Specified by:
addDataSourceInformationin interfaceDataSourceInformationRepositoryListener- Parameters:
dataSourceInformation- added DataSourceInformation instance
-
removeDataSourceInformation
public void removeDataSourceInformation(DataSourceInformation dataSourceInformation)
Description copied from interface:DataSourceInformationRepositoryListenerEvent when removing a DataSourceInformation instance- Specified by:
removeDataSourceInformationin interfaceDataSourceInformationRepositoryListener- Parameters:
dataSourceInformation- removed DataSourceInformation instance
-
reConfigure
public void reConfigure(Properties confProperties)
Description copied from interface:DataSourceInformationRepositoryListenerEvent when re-configuring the DataSourceInformationRepository- Specified by:
reConfigurein interfaceDataSourceInformationRepositoryListener- Parameters:
confProperties- properties used to configure DataSourceInformationRepository
-
clear
public void clear()
Clear all DataSource Repositories
-
-