Record Class JsonRpcMessage.Request<T>
java.lang.Object
java.lang.Record
dev.tachyonmcp.core.transport.jsonrpc.JsonRpcMessage.Request<T>
- Type Parameters:
T- the type of the params payload- Record Components:
id- the request identifiermethod- the method name to invokeparams- the method parameters, ornull
- All Implemented Interfaces:
JsonRpcMessage
- Enclosing interface:
JsonRpcMessage
public static record JsonRpcMessage.Request<T>(RequestId id, String method, @Nullable T params)
extends Record
implements JsonRpcMessage
A JSON-RPC request with an ID (expecting a 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 TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.method()Returns the value of themethodrecord component.@Nullable Tparams()Returns the value of theparamsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceJsonRpcMessage- Returns:
- the value of the
idrecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-