public class DataProviderEndPoint extends Object implements org.wso2.msf4j.websocket.WebSocketEndpoint
| Constructor and Description |
|---|
DataProviderEndPoint() |
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(javax.websocket.Session session)
handle disconnection with the client.
|
void |
onError(Throwable throwable)
handle on error.
|
void |
onMessage(String message,
String sourceType,
javax.websocket.Session session)
Create DataProvider instance, start it and store it in the providerMap.
|
void |
onOpen(javax.websocket.Session session)
Handle initiation of the connection map the session object in the session map.
|
protected void |
registerDataSourceService(org.wso2.carbon.datasource.core.api.DataSourceService service) |
static void |
sendText(String text,
String sessionId)
Send message to specific client.
|
protected void |
setConfigProvider(org.wso2.carbon.config.provider.ConfigProvider configProvider) |
protected void |
unregisterDataSourceService(org.wso2.carbon.datasource.core.api.DataSourceService service) |
protected void |
unsetConfigProvider(org.wso2.carbon.config.provider.ConfigProvider configProvider) |
protected void registerDataSourceService(org.wso2.carbon.datasource.core.api.DataSourceService service)
protected void unregisterDataSourceService(org.wso2.carbon.datasource.core.api.DataSourceService service)
protected void setConfigProvider(org.wso2.carbon.config.provider.ConfigProvider configProvider)
protected void unsetConfigProvider(org.wso2.carbon.config.provider.ConfigProvider configProvider)
public void onOpen(javax.websocket.Session session)
session - Session object associated with the connectionpublic void onMessage(String message, String sourceType, javax.websocket.Session session)
message - String message received from the web clientsourceType - datasource type from the Path parametersession - Session object associated with the connectionpublic void onClose(javax.websocket.Session session)
session - Session object associated with the connectionpublic void onError(Throwable throwable)
public static void sendText(String text, String sessionId) throws IOException
text - String message to be sent to the clientsessionId - String session id of the sessionIOException - If there is a problem delivering the messageCopyright © 2017 WSO2. All rights reserved.