Package io.openems.backend.edgewebsocket
Class SystemLogHandler
- java.lang.Object
-
- io.openems.backend.edgewebsocket.SystemLogHandler
-
public class SystemLogHandler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SystemLogHandler(EdgeWebsocketImpl parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addToken(java.lang.String edgeId, java.lang.String token)
Adds a subscription Token for the given Edge-ID.protected java.util.Set<java.lang.String>
getTokens(java.lang.String edgeId)
Gets all subscription Tokens for the given Edge-ID.java.util.concurrent.CompletableFuture<JsonrpcResponseSuccess>
handleSubscribeSystemLogRequest(java.lang.String edgeId, User user, java.lang.String token, SubscribeSystemLogRequest request)
Handles aSubscribeSystemLogRequest
.void
handleSystemLogNotification(java.lang.String edgeId, SystemLogNotification notification)
Handles aSystemLogNotification
, i.e.protected void
removeToken(java.lang.String edgeId, java.lang.String token)
Removes a subscription Token from the given Edge-ID.
-
-
-
Constructor Detail
-
SystemLogHandler
public SystemLogHandler(EdgeWebsocketImpl parent)
-
-
Method Detail
-
handleSubscribeSystemLogRequest
public java.util.concurrent.CompletableFuture<JsonrpcResponseSuccess> handleSubscribeSystemLogRequest(java.lang.String edgeId, User user, java.lang.String token, SubscribeSystemLogRequest request) throws OpenemsError.OpenemsNamedException
Handles aSubscribeSystemLogRequest
.- Parameters:
edgeId
- the Edge-IDuser
- theUser
token
- the UI session tokenrequest
- theSubscribeSystemLogRequest
- Returns:
- a reply
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
handleSystemLogNotification
public void handleSystemLogNotification(java.lang.String edgeId, SystemLogNotification notification)
Handles aSystemLogNotification
, i.e. the replies toSubscribeSystemLogRequest
.- Parameters:
edgeId
- the Edge-IDnotification
- theSystemLogNotification
-
addToken
protected void addToken(java.lang.String edgeId, java.lang.String token)
Adds a subscription Token for the given Edge-ID.- Parameters:
edgeId
- the Edge-IDtoken
- the Token
-
removeToken
protected void removeToken(java.lang.String edgeId, java.lang.String token)
Removes a subscription Token from the given Edge-ID.- Parameters:
edgeId
- the Edge-IDtoken
- the Token
-
getTokens
protected java.util.Set<java.lang.String> getTokens(java.lang.String edgeId)
Gets all subscription Tokens for the given Edge-ID.- Parameters:
edgeId
- the Edge-ID- Returns:
- a Set of Tokens; or null
-
-