Class WebSocketProvider
- java.lang.Object
-
- org.wso2.carbon.data.provider.websocket.WebSocketProvider
-
- All Implemented Interfaces:
DataProvider
public class WebSocketProvider extends Object implements DataProvider
-
-
Constructor Summary
Constructors Constructor Description WebSocketProvider()
-
Method Summary
All Methods Instance Methods Concrete 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
public DataProvider init(String topic, String sessionId, com.google.gson.JsonElement jsonElement) throws DataProviderException
Description copied from interface:DataProviderInitialize the instance with the session id.- Specified by:
initin interfaceDataProvider- 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
public void start()
Description copied from interface:DataProviderStart pushing data to the client from the data sources.- Specified by:
startin interfaceDataProvider
-
stop
public void stop()
Description copied from interface:DataProviderStop pushing data to the client and disconnect.- Specified by:
stopin interfaceDataProvider
-
configValidator
public boolean configValidator(ProviderConfig providerConfig) throws DataProviderException
Description copied from interface:DataProviderProvider configuration validator.- Specified by:
configValidatorin interfaceDataProvider- Parameters:
providerConfig- provider configuration get from the client.- Returns:
- validation results.
- Throws:
DataProviderException- if the validation failed due to exception.
-
providerName
public String providerName()
Description copied from interface:DataProviderGet the data provider name.- Specified by:
providerNamein interfaceDataProvider- Returns:
- name of the data provider.
-
dataSetMetadata
public DataSetMetadata dataSetMetadata()
Description copied from interface:DataProviderGet the data provider meta data object.- Specified by:
dataSetMetadatain interfaceDataProvider- Returns:
- meta data of the data provider.
-
providerConfig
public String providerConfig()
Description copied from interface:DataProviderGet the data provider configuration.- Specified by:
providerConfigin interfaceDataProvider- Returns:
- configuration of the data provider.
-
-