Queryable class

A zenoh queryable that receives queries on a key expression.

Wraps z_owned_queryable_t. Queries are delivered asynchronously via a Stream. Call close when done to undeclare the queryable and release native resources.

This object holds a native handle, so it cannot cross an isolate boundary: a copy would share this one's native address while carrying its own fresh disposal flag, and the second release would be a use-after-free. Sending it throws ArgumentError naming the class.

No NativeFinalizer is attached to this class, deliberately: as Subscriber — the stream a user holds does not reference this wrapper, so it is collected while still in use. Releasing it explicitly is therefore the only thing that reclaims it.

Implemented types

Constructors

Queryable.declare(Pointer<Void> loanedSession, Pointer<Void> loanedKeyExpr, String keyExprStr, {bool complete = false, Locality? allowedOrigin})
Creates a queryable on the given session and key expression.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
keyExpr String
The key expression this queryable is declared on.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<Query>
A stream of Querys received by this queryable.
no setter

Methods

close() → void
Undeclares the queryable and releases native resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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