public abstract class DataSourceProvider extends Object
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.
Constructor and Description |
---|
DataSourceProvider() |
Modifier and Type | Method and Description |
---|---|
static CompositeDataSource |
createDataSource()
Looks up the registered factories and creates a CompositeDataSource
using them.
|
abstract DataSource |
createInstance()
Creates a new instance of the DataSource.
|
abstract String |
getName()
The name to be used when registering the DataSource with the
CompositeDataSource.
|
public abstract String getName()
public abstract DataSource createInstance()
public static CompositeDataSource createDataSource()
Copyright © 2015. All rights reserved.