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 void
addDataSourceInformation(DataSourceInformation dataSourceInformation)
Event when adding a DataSourceInformationvoid
clear()
Clear all DataSource RepositoriesDataSource
getDataSource(String name)
Find a DataSource using given namevoid
reConfigure(Properties confProperties)
Event when re-configuring the DataSourceInformationRepositoryvoid
removeDataSourceInformation(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:DataSourceInformationRepositoryListener
Event when adding a DataSourceInformation- Specified by:
addDataSourceInformation
in interfaceDataSourceInformationRepositoryListener
- Parameters:
dataSourceInformation
- added DataSourceInformation instance
-
removeDataSourceInformation
public void removeDataSourceInformation(DataSourceInformation dataSourceInformation)
Description copied from interface:DataSourceInformationRepositoryListener
Event when removing a DataSourceInformation instance- Specified by:
removeDataSourceInformation
in interfaceDataSourceInformationRepositoryListener
- Parameters:
dataSourceInformation
- removed DataSourceInformation instance
-
reConfigure
public void reConfigure(Properties confProperties)
Description copied from interface:DataSourceInformationRepositoryListener
Event when re-configuring the DataSourceInformationRepository- Specified by:
reConfigure
in interfaceDataSourceInformationRepositoryListener
- Parameters:
confProperties
- properties used to configure DataSourceInformationRepository
-
clear
public void clear()
Clear all DataSource Repositories
-
-