Class DataSourceProvider


  • public abstract class DataSourceProvider
    extends Object
    A class that provides support for a DataSource.

    This interface allows different modules to registers a DataSource through the ServiceLoader. Implementations that are correctly registered will be asked to create a DataSource instance which will be registered into a CompositeDataSource with the given name.

    The factory only needs to care about the DataSource creation, and not the rest of the life-cycle.

    Author:
    carcassi
    • Constructor Detail

      • DataSourceProvider

        public DataSourceProvider()
    • Method Detail

      • getName

        public abstract String getName()
        The name to be used when registering the DataSource with the CompositeDataSource.
        Returns:
        a short String
      • createInstance

        public abstract DataSource createInstance()
        Creates a new instance of the DataSource.
        Returns:
        a new DataSource