fix formating

revert-dabc3590
warunalakshitha 7 years ago
parent 9ebb808b1d
commit 09724df216

@ -43,9 +43,11 @@ public class ClientSessionSubscriptionEndpoint extends SubscriptionEndpoint {
private static final Log log = LogFactory.getLog(ClientSessionSubscriptionEndpoint.class);
/**
* Web socket onOpen - When client sends a message
* Web socket onOpen use when client connect to web socket url
*
* @param session - Users registered session..
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
*/
@OnOpen
public void onOpen(Session session, @PathParam("deviceType") String deviceType, @PathParam("deviceId") String
@ -66,9 +68,11 @@ public class ClientSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onMessage - When client sends a message
* Web socket onMessage use when client sends a string message
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param message - Status code for web-socket close.
*/
@OnMessage
@ -78,9 +82,11 @@ public class ClientSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onMessage - When client sends a message
* Web socket onMessage use when client sends a byte message
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param message - Message which needs to send to peer
*/
@OnMessage
@ -90,9 +96,11 @@ public class ClientSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onClose - Remove the registered sessions
* Web socket onClose - Handle socket connection close
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param reason - Status code for web-socket close.
*/
@OnClose
@ -102,9 +110,11 @@ public class ClientSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onError - Remove the registered sessions
* Web socket onError - Handle socket connection error
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param throwable - Status code for web-socket close.
*/
@OnError

@ -43,9 +43,12 @@ public class DeviceSessionSubscriptionEndpoint extends SubscriptionEndpoint {
private static final Log log = LogFactory.getLog(DeviceSessionSubscriptionEndpoint.class);
/**
* Web socket onOpen - When client sends a message
* Web socket onOpen use when device connect to web socket url
*
* @param session - Users registered session..
* @param session - Web socket Session
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param operationId - Operations Id
*/
@OnOpen
public void onOpen(Session session, @PathParam("deviceType") String deviceType, @PathParam("deviceId") String
@ -66,10 +69,12 @@ public class DeviceSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onMessage - When client sends a message
* Web socket onMessage use when device sends a string message
*
* @param session - Users registered session.
* @param session - Registered session.
* @param message - Status code for web-socket close.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
*/
@OnMessage
public void onMessage(Session session, String message, @PathParam("deviceType") String deviceType, @PathParam
@ -78,9 +83,12 @@ public class DeviceSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onMessage - When client sends a message
* Web socket onMessage use when device sends a byte message
*
* @param session - Users registered session.
* @param session - Registered session.
* @param message - Status code for web-socket close.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param message - Message which needs to send to peer
*/
@OnMessage
@ -90,9 +98,11 @@ public class DeviceSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onClose - Remove the registered sessions
* Web socket onClose - Handle socket connection close
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param reason - Status code for web-socket close.
*/
@OnClose
@ -102,9 +112,11 @@ public class DeviceSessionSubscriptionEndpoint extends SubscriptionEndpoint {
}
/**
* Web socket onError - Remove the registered sessions
* Web socket onError - Handle socket connection error
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param throwable - Status code for web-socket close.
*/
@OnError

@ -38,7 +38,9 @@ public class SubscriptionEndpoint {
/**
* Web socket onMessage - When client sends a message
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param message - Status code for web-socket close.
*/
public void onMessage(Session session, String message, @PathParam("deviceType") String deviceType, @PathParam
@ -64,9 +66,11 @@ public class SubscriptionEndpoint {
}
/**
* Web socket onMessage - When client sends a message
* Web socket onMessage use When client sends a message
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param message - Message which needs to send to peer
*/
public void onMessage(Session session, byte[] message, @PathParam("deviceType") String deviceType, @PathParam
@ -92,9 +96,11 @@ public class SubscriptionEndpoint {
}
/**
* Web socket onClose - Remove the registered sessions
* Web socket onClose - Handle socket connection close
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param reason - Status code for web-socket close.
*/
public void onClose(Session session, CloseReason reason, @PathParam("deviceType") String deviceType, @PathParam
@ -110,9 +116,11 @@ public class SubscriptionEndpoint {
}
/**
* Web socket onError - Remove the registered sessions
* Web socket onError - Handle socket connection error
*
* @param session - Users registered session.
* @param session - Registered session.
* @param deviceType - DeviceType
* @param deviceId - Device Identifier
* @param throwable - Status code for web-socket close.
*/
public void onError(Session session, Throwable throwable, @PathParam("deviceType") String deviceType, @PathParam

@ -25,4 +25,7 @@ package org.wso2.carbon.device.mgt.extensions.remote.session.endpoint.constants;
*/
public class Constants {
public static final String HTTP_HEADERS = "HttpHeaders";
private Constants() {
}
}

@ -28,6 +28,9 @@ import javax.websocket.server.ServerEndpointConfig;
import java.util.List;
import java.util.Map;
/**
* Class for handle HTTP session
*/
public class HttpSessionConfigurator extends ServerEndpointConfig.Configurator {
public void modifyHandshake(ServerEndpointConfig config, HandshakeRequest request, HandshakeResponse response) {
Map<String, List<String>> httpHeaders = request.getHeaders();

@ -23,6 +23,9 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.extensions.remote.session.RemoteSessionManagementService;
/**
* Class for store remote management service instances
*/
public class ServiceHolder {
private static ServiceHolder instance;

Loading…
Cancel
Save