Package io.openems.common.websocket
Class WebsocketUtils
java.lang.Object
io.openems.common.websocket.WebsocketUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getWsDataString
(org.java_websocket.WebSocket ws) Gets the toString() content of the WsData attachment of the WebSocket; or empty string if not available.static com.google.gson.JsonObject
handshakeToJsonObject
(org.java_websocket.handshake.Handshakedata handshake) Converts a Handshake to a JsonObject.
-
Constructor Details
-
WebsocketUtils
public WebsocketUtils()
-
-
Method Details
-
handshakeToJsonObject
public static com.google.gson.JsonObject handshakeToJsonObject(org.java_websocket.handshake.Handshakedata handshake) Converts a Handshake to a JsonObject.- Parameters:
handshake
- theHandshakedata
- Returns:
- the converted
JsonObject
-
getWsDataString
Gets the toString() content of the WsData attachment of the WebSocket; or empty string if not available.- Parameters:
ws
- the WebSocket- Returns:
- the
WsData.toString()
content
-