public class WebSocketProvider extends Object implements DataProvider
| Constructor and Description |
|---|
WebSocketProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
configValidator(ProviderConfig providerConfig)
Provider configuration validator.
|
DataSetMetadata |
dataSetMetadata()
Get the data provider meta data object.
|
DataProvider |
init(String topic,
String sessionId,
com.google.gson.JsonElement jsonElement)
Initialize the instance with the session id.
|
String |
providerConfig()
Get the data provider configuration.
|
String |
providerName()
Get the data provider name.
|
void |
start()
Start pushing data to the client from the data sources.
|
void |
stop()
Stop pushing data to the client and disconnect.
|
public DataProvider init(String topic, String sessionId, com.google.gson.JsonElement jsonElement) throws DataProviderException
DataProviderinit in interface DataProvidertopic - 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.DataProviderException - if there any initialization failures.public void start()
DataProviderstart in interface DataProviderpublic void stop()
DataProviderstop in interface DataProviderpublic boolean configValidator(ProviderConfig providerConfig) throws DataProviderException
DataProviderconfigValidator in interface DataProviderproviderConfig - provider configuration get from the client.DataProviderException - if the validation failed due to exception.public String providerName()
DataProviderproviderName in interface DataProviderpublic DataSetMetadata dataSetMetadata()
DataProviderdataSetMetadata in interface DataProviderpublic String providerConfig()
DataProviderproviderConfig in interface DataProviderCopyright © 2019 WSO2. All rights reserved.