Interface UiWebsocket
- All Known Implementing Classes:
UiWebsocketImpl
@ProviderType
public interface UiWebsocket
-
Method Summary
Modifier and TypeMethodDescriptionvoid
send
(String token, JsonrpcNotification notification) Send a JSON-RPC Notification to a UI session.send
(String token, JsonrpcRequest request) Send a JSON-RPC Request to a UI session via WebSocket and expect a JSON-RPC Response.void
sendBroadcast
(String edgeId, JsonrpcNotification notification) Send a JSON-RPC Notification broadcast to all UI sessions with a given Edge-ID.void
sendSubscribedChannels
(String edgeId, EdgeCache edgeCache) Sends the subscribed Channels to the UI session.
-
Method Details
-
send
CompletableFuture<JsonrpcResponseSuccess> send(String token, JsonrpcRequest request) throws OpenemsError.OpenemsNamedException Send a JSON-RPC Request to a UI session via WebSocket and expect a JSON-RPC Response.- Parameters:
token
- the UI tokenrequest
- the JsonrpcRequest- Returns:
- the JSON-RPC Success Response Future
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
send
Send a JSON-RPC Notification to a UI session.- Parameters:
token
- the UI tokennotification
- the JsonrpcNotification- Throws:
OpenemsError.OpenemsNamedException
- on error
-
sendBroadcast
void sendBroadcast(String edgeId, JsonrpcNotification notification) throws OpenemsError.OpenemsNamedException Send a JSON-RPC Notification broadcast to all UI sessions with a given Edge-ID.- Parameters:
edgeId
- the Edge-IDnotification
- the JsonrpcNotification- Throws:
OpenemsError.OpenemsNamedException
- on error
-
sendSubscribedChannels
Sends the subscribed Channels to the UI session.- Parameters:
edgeId
- the Edge-IDedgeCache
- theEdgeCache
for the Edge-ID
-