Package io.openems.common.jsonrpc.base
Class AbstractJsonrpcRequest
- java.lang.Object
-
- io.openems.common.jsonrpc.base.JsonrpcMessage
-
- io.openems.common.jsonrpc.base.AbstractJsonrpcRequest
-
- Direct Known Subclasses:
JsonrpcNotification
,JsonrpcRequest
public abstract class AbstractJsonrpcRequest extends JsonrpcMessage
This represents a JsonrpcRequest. It could either be aJsonrpcRequest
or aJsonrpcNotification
.- See Also:
- JSON-RPC specification
-
-
Field Summary
-
Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
JSONRPC_VERSION
-
-
Constructor Summary
Constructors Constructor Description AbstractJsonrpcRequest(java.lang.String method)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFullyQualifiedMethod()
Returns the complete method name, up to the innermost payload.java.lang.String
getMethod()
abstract com.google.gson.JsonObject
getParams()
Gets the paramsJsonObject
of theJsonrpcRequest
.com.google.gson.JsonObject
toJsonObject()
Gets theJsonObject
representation of thisJsonrpcMessage
.-
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
from, from, toString
-
-
-
-
Method Detail
-
getMethod
public java.lang.String getMethod()
-
getFullyQualifiedMethod
public java.lang.String getFullyQualifiedMethod()
Returns the complete method name, up to the innermost payload.- Returns:
- combined method names
-
getParams
public abstract com.google.gson.JsonObject getParams()
Gets the paramsJsonObject
of theJsonrpcRequest
.- Returns:
- the params as
JsonObject
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()
Description copied from class:JsonrpcMessage
Gets theJsonObject
representation of thisJsonrpcMessage
.- Overrides:
toJsonObject
in classJsonrpcMessage
- Returns:
- a
JsonObject
-
-