Class JsonRpcRequestHandlerImpl
java.lang.Object
io.openems.backend.common.component.AbstractOpenemsBackendComponent
io.openems.backend.core.jsonrpcrequesthandler.JsonRpcRequestHandlerImpl
- All Implemented Interfaces:
JsonRpcRequestHandler
public class JsonRpcRequestHandlerImpl
extends AbstractOpenemsBackendComponent
implements JsonRpcRequestHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.openems.backend.core.jsonrpcrequesthandler.Config
protected EdgeWebsocket
protected Metadata
protected TimedataManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<? extends JsonrpcResponseSuccess>
handleRequest
(String context, User user, JsonrpcRequest request) Handles a JSON-RPC Request.protected void
Log an error message including the Handler name.protected void
Log an info message including the Handler name.protected void
Log a warn message including the Handler name.
-
Field Details
-
edgeWebsocket
-
metadata
-
timedataManager
-
config
protected io.openems.backend.core.jsonrpcrequesthandler.Config config
-
-
Constructor Details
-
JsonRpcRequestHandlerImpl
public JsonRpcRequestHandlerImpl()
-
-
Method Details
-
handleRequest
public CompletableFuture<? extends JsonrpcResponseSuccess> handleRequest(String context, User user, JsonrpcRequest request) throws OpenemsError.OpenemsNamedException Handles a JSON-RPC Request.- Specified by:
handleRequest
in interfaceJsonRpcRequestHandler
- Parameters:
context
- the Logger context, i.e. the name of the parent sourceuser
- theUser
request
- the JsonrpcRequest- Returns:
- the JSON-RPC Success Response Future
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
logInfo
Log an info message including the Handler name.- Parameters:
context
- the Logger context, i.e. the name of the parent sourcemessage
- the Info-message
-
logWarn
Log a warn message including the Handler name.- Parameters:
context
- the Logger context, i.e. the name of the parent sourcemessage
- the Warn-message
-
logError
Log an error message including the Handler name.- Parameters:
context
- the Logger context, i.e. the name of the parent sourcemessage
- the Error-message
-