DiscoveryQuery class sealed

A transport-neutral peer filter.

This replaces the raw XPath predicate strings the LSL transport used to build by concatenation. Transports that can resolve peers locally (the in-memory bus, the WebSocket hub) evaluate the tree directly with matches; the LSL transport compiles it to XPath, because that is the only query language its resolver speaks.

Keeping this a data structure rather than a string is what makes discovery portable — and it removes a whole class of quoting bugs, since values never have to survive being spliced into a query language.

Implementers

Constructors

DiscoveryQuery.all(List<DiscoveryQuery> terms)
All of terms must match. An empty list matches everything.
factory
DiscoveryQuery.any(List<DiscoveryQuery> terms)
Any of terms must match. An empty list matches nothing.
factory
DiscoveryQuery.not(DiscoveryQuery term)
Negates term.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

matches(PeerDescriptor peer) → bool
Whether peer satisfies this query.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromJson(Map<String, dynamic> json) → DiscoveryQuery