public class DataProviderEndPoint extends Object implements org.wso2.msf4j.websocket.WebSocketEndpoint
| Constructor and Description |
|---|
DataProviderEndPoint() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,javax.websocket.Session> |
getSessionMap() |
void |
onClose(javax.websocket.Session session)
handle disconnection with the client.
|
void |
onError(Throwable throwable)
handle on error.
|
void |
onMessage(String message,
javax.websocket.Session session)
Create DataProvider instance, start it and store it in the providerMap.
|
static 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 sessionId,
String text)
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 static void onOpen(javax.websocket.Session session)
session - Session object associated with the connectionpublic void onMessage(String message, javax.websocket.Session session)
message - String message received from the web clientsession - 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 sessionId, String text) throws IOException
sessionId - sessionId of the client.text - String message to be sent to the client.IOException - If there is a problem delivering the message.Copyright © 2018 WSO2. All rights reserved.