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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clear already registered datasources
    `void` | `init(java.util.Properties properties)` Initialization with given properties
    `boolean` | `isInitialized()` Explicitly check for init
    `javax.sql.DataSource` | `lookUp(java.lang.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(java.lang.String name)` Removing datasource

- - ### Method Detail

    - #### init

          void init(java.util.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(java.lang.String name)

      Removing datasource
      Parameters:
        `name` - name of the datasource to be removed

    - #### lookUp

          javax.sql.DataSource lookUp(java.lang.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

Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.