SubscriptionFilter class
Draft SubscriptionFilter — the opt-in set of notification types a client
requests on a subscriptions/listen stream. The server MUST NOT deliver a
notification type the client did not request here.
Constructors
-
SubscriptionFilter({bool toolsListChanged = false, bool promptsListChanged = false, bool resourcesListChanged = false, List<
String> resourceSubscriptions = const <String>[]}) -
const
-
SubscriptionFilter.fromJson(Map<
String, dynamic> json) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
no setter
- promptsListChanged → bool
-
final
- resourcesListChanged → bool
-
final
-
resourceSubscriptions
→ List<
String> -
Resource URIs to receive
notifications/resources/updatedfor (replaces the formerresources/subscribeRPC).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toolsListChanged → bool
-
final
Methods
-
allows(
String method, {String? uri}) → bool -
Whether this filter opted into the given notification
method. Fornotifications/resources/updated,urimust be in resourceSubscriptions. -
honoredBy(
{required bool hasTools, required bool hasPrompts, required bool hasResources}) → SubscriptionFilter - The subset of this filter the server can actually honor, given which capabilities it advertises. Unsupported types are dropped from the acknowledged set (schema: an unsupported requested type is omitted).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Emits only the honored/requested fields (booleans only when true, URIs only when non-empty) — matching the acknowledged-subset shape.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited