Record Class JsonRpcMessage.Error
java.lang.Object
java.lang.Record
dev.tachyonmcp.core.transport.jsonrpc.JsonRpcMessage.Error
- Record Components:
id- the request identifier, ornullcode- the JSON-RPC error codemessage- a human-readable error messagedataJson- optional JSON-encoded error data, ornull
- All Implemented Interfaces:
JsonRpcMessage
- Enclosing interface:
JsonRpcMessage
public static record JsonRpcMessage.Error(@Nullable RequestId id, int code, String message, @Nullable String dataJson)
extends Record
implements JsonRpcMessage
A JSON-RPC error response.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.tachyonmcp.core.transport.jsonrpc.JsonRpcMessage
JsonRpcMessage.Error, JsonRpcMessage.Notification<T>, JsonRpcMessage.Request<T>, JsonRpcMessage.Response -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.@Nullable StringdataJson()Returns the value of thedataJsonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable RequestIdid()Returns the value of theidrecord component.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceJsonRpcMessage- Returns:
- the value of the
idrecord component
-
code
public int code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
dataJson
Returns the value of thedataJsonrecord component.- Returns:
- the value of the
dataJsonrecord component
-