Package org.wso2.carbon.data.provider
Interface DataProvider
-
- All Known Implementing Classes:
AbstractDataProvider,AbstractRDBMSDataProvider,RDBMSBatchDataProvider,RDBMSStreamingDataProvider,SiddhiProvider,WebSocketProvider
public interface DataProviderData provider interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanconfigValidator(ProviderConfig providerConfig)Provider configuration validator.DataSetMetadatadataSetMetadata()Get the data provider meta data object.DataProviderinit(String topic, String sessionId, com.google.gson.JsonElement jsonElement)Initialize the instance with the session id.StringproviderConfig()Get the data provider configuration.StringproviderName()Get the data provider name.voidstart()Start pushing data to the client from the data sources.voidstop()Stop pushing data to the client and disconnect.
-
-
-
Method Detail
-
init
DataProvider init(String topic, String sessionId, com.google.gson.JsonElement jsonElement) throws DataProviderException
Initialize the instance with the session id.- Parameters:
topic- to receive topic messages, data provider send event with this topic.sessionId- data provider send event for this session.jsonElement- provider configuration message in json format.- Returns:
- data provider initialized with provider configuration.
- Throws:
DataProviderException- if there any initialization failures.
-
start
void start()
Start pushing data to the client from the data sources.
-
stop
void stop()
Stop pushing data to the client and disconnect.
-
configValidator
boolean configValidator(ProviderConfig providerConfig) throws DataProviderException
Provider configuration validator.- Parameters:
providerConfig- provider configuration get from the client.- Returns:
- validation results.
- Throws:
DataProviderException- if the validation failed due to exception.
-
providerName
String providerName()
Get the data provider name.- Returns:
- name of the data provider.
-
dataSetMetadata
DataSetMetadata dataSetMetadata()
Get the data provider meta data object.- Returns:
- meta data of the data provider.
-
providerConfig
String providerConfig()
Get the data provider configuration.- Returns:
- configuration of the data provider.
-
-