Record Class JsonRpcMessage.Notification<T>
java.lang.Object
java.lang.Record
dev.tachyonmcp.core.transport.jsonrpc.JsonRpcMessage.Notification<T>
- Type Parameters:
T- the type of the params payload- Record Components:
method- the method nameparams- the notification parameters, ornull
- All Implemented Interfaces:
JsonRpcMessage
- Enclosing interface:
JsonRpcMessage
public static record JsonRpcMessage.Notification<T>(String method, @Nullable T params)
extends Record
implements JsonRpcMessage
A JSON-RPC notification (no ID, no response expected).
-
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
ConstructorsConstructorDescriptionNotification(String method, @Nullable T params) Creates an instance of aNotificationrecord class. -
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.@Nullable RequestIdid()The request/response ID, ornullfor notifications.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
-
id
Description copied from interface:JsonRpcMessageThe request/response ID, ornullfor notifications.- Specified by:
idin interfaceJsonRpcMessage
-
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). -
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
-