Interface EdgeWebsocket
- All Known Implementing Classes:
EdgeWebsocketImpl
@ProviderType
public interface EdgeWebsocket
-
Method Summary
Modifier and TypeMethodDescriptionMap<ChannelAddress,
com.google.gson.JsonElement> getChannelValues
(String edgeId, Set<ChannelAddress> channelAddresses) Gets the latest values for the given ChannelAddresses.handleSubscribeSystemLogRequest
(String edgeId, User user, String token, SubscribeSystemLogRequest request) Handles aSubscribeSystemLogRequest
.send
(String edgeId, User user, JsonrpcRequest request) Send an authenticated JSON-RPC Request to an Edge via Websocket and expect a JSON-RPC Response.void
send
(String edgeId, JsonrpcNotification notification) Send a JSON-RPC Notification to an Edge.
-
Method Details
-
send
CompletableFuture<JsonrpcResponseSuccess> send(String edgeId, User user, JsonrpcRequest request) throws OpenemsError.OpenemsNamedException Send an authenticated JSON-RPC Request to an Edge via Websocket and expect a JSON-RPC Response.- Parameters:
edgeId
- the Edge-IDuser
- the authenticatedUser
request
- theJsonrpcRequest
- Returns:
- the JSON-RPC Success Response Future
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
send
void send(String edgeId, JsonrpcNotification notification) throws OpenemsError.OpenemsNamedException Send a JSON-RPC Notification to an Edge.- Parameters:
edgeId
- the Edge-IDnotification
- the JsonrpcNotification- Throws:
OpenemsError.OpenemsNamedException
- on error
-
handleSubscribeSystemLogRequest
CompletableFuture<JsonrpcResponseSuccess> handleSubscribeSystemLogRequest(String edgeId, User user, 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
-
getChannelValues
Map<ChannelAddress,com.google.gson.JsonElement> getChannelValues(String edgeId, Set<ChannelAddress> channelAddresses) Gets the latest values for the given ChannelAddresses.- Parameters:
edgeId
- The unique Edge-IDchannelAddresses
- TheChannelAddress
es- Returns:
- the values; possibly
JsonNull
-