Package io.openems.backend.edgewebsocket
Class WsData
- java.lang.Object
-
- io.openems.common.websocket.WsData
-
- io.openems.backend.edgewebsocket.WsData
-
public class WsData extends WsData
-
-
Constructor Summary
Constructors Constructor Description WsData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
assertEdgeId(JsonrpcMessage message)
Asserts that the Edge-ID is available (i.e.java.lang.String
assertEdgeIdWithTimeout(JsonrpcMessage message, long timeout, java.util.concurrent.TimeUnit unit)
Asserts that the Edge-ID is available (i.e.java.util.Optional<java.lang.String>
getEdgeId()
void
setEdgeId(java.lang.String edgeId)
java.lang.String
toString()
Provides a specific toString method.-
Methods inherited from class io.openems.common.websocket.WsData
dispose, getWebsocket, handleJsonrpcResponse, send, send, setWebsocket
-
-
-
-
Field Detail
-
edgeCache
public final EdgeCache edgeCache
-
-
Method Detail
-
assertEdgeId
public java.lang.String assertEdgeId(JsonrpcMessage message) throws OpenemsException
Asserts that the Edge-ID is available (i.e. properly authenticated).- Parameters:
message
- a identification message on error- Returns:
- the Edge-ID
- Throws:
OpenemsException
- on error
-
assertEdgeIdWithTimeout
public java.lang.String assertEdgeIdWithTimeout(JsonrpcMessage message, long timeout, java.util.concurrent.TimeUnit unit) throws OpenemsException
Asserts that the Edge-ID is available (i.e. properly authenticated) within a timeout.- Parameters:
message
- a identification message on errortimeout
- the timeout lengthunit
- theTimeUnit
of the timeout- Returns:
- the Edge-ID
- Throws:
OpenemsError.OpenemsNamedException
- on errorOpenemsException
-
setEdgeId
public void setEdgeId(java.lang.String edgeId)
-
getEdgeId
public java.util.Optional<java.lang.String> getEdgeId()
-
-