CancelledNotification

@Serializable
data class CancelledNotification(val requestId: RequestId, val reason: String?, val _meta: JsonObject = EmptyJsonObject) : ClientNotification, ServerNotification, WithMeta(source)

This notification can be sent by either side to indicate that it is cancelling a previously issued request.

The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.

This notification indicates that the result will be unused, so any associated processing SHOULD cease.

A client MUST NOT attempt to cancel its initialize request.

Constructors

Link copied to clipboard
constructor(requestId: RequestId, reason: String?, _meta: JsonObject = EmptyJsonObject)

Properties

Link copied to clipboard
open override val _meta: JsonObject

The protocol reserves this result property to allow clients and servers to attach additional metadata to their responses.

Link copied to clipboard
open override val method: Method
Link copied to clipboard

An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.

Link copied to clipboard

The ID of the request to cancel.

Functions

Link copied to clipboard

Converts the notification to a JSON-RPC notification.