Package org.apache.synapse.commons.datasource

# Interface DataSourceRepository

All Known Implementing Classes:
  `InMemoryDataSourceRepository`, `JNDIBasedDataSourceRepository`

public interface DataSourceRepository
Keep all DataSources defined in the Synapse

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Clear already registered datasources
  `void`
  `init(Properties properties)`
  Initialization with given properties
  `boolean`
  `isInitialized()`
  Explicitly check for init
  `DataSource`
  `lookUp(String name)`
  Find and Returns an registered DataSource in the DataSourceRegistry
  `void`
  `register(DataSourceInformation information)`
  Register a DataSource based on given information Information is encapsulated in a DataSourceInformation instance
  `void`
  `unRegister(String name)`
  Removing datasource

- ## Method Details

  - ### init

    void init(Properties properties)
    Initialization with given properties
    Parameters:
      `properties` - configuration properties

  - ### isInitialized

    boolean isInitialized()
    Explicitly check for init
    Returns:
      True , if has already initialized

  - ### register

    void register(DataSourceInformation information)
    Register a DataSource based on given information Information is encapsulated in a DataSourceInformation instance
    Parameters:
      `information` - DataSourceInformation instance

  - ### unRegister

    void unRegister(String name)
    Removing datasource
    Parameters:
      `name` - name of the datasource to be removed

  - ### lookUp

    DataSource lookUp(String name)
    Find and Returns an registered DataSource in the DataSourceRegistry
    Parameters:
      `name` - Name of the DataSource to be looked up
    Returns:
      DataSource Instance

  - ### clear

    void clear()
    Clear already registered datasources