Package org.epics.gpclient.datasource
Class DataSourceProvider
- java.lang.Object
-
- org.epics.gpclient.datasource.DataSourceProvider
-
public abstract class DataSourceProvider extends Object
A class that provides support for aDataSource
.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 Summary
Constructors Constructor Description DataSourceProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CompositeDataSource
createDataSource()
Looks up the registered factories and creates aCompositeDataSource
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.
-
-
-
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
-
createDataSource
public static CompositeDataSource createDataSource()
Looks up the registered factories and creates aCompositeDataSource
using them.- Returns:
- a new DataSource
-
-