Class Selector

  • All Implemented Interfaces:
    io.zenoh.query.IntoSelector , java.lang.AutoCloseable

    
    public final class Selector
     implements AutoCloseable, IntoSelector
                        

    A selector is the combination of a KeyExpr, which defines the set of keys that are relevant to an operation, and a set of parameters with a few intended uses:

    • specifying arguments to a queryable, allowing the passing of Remote Procedure Call parameters

    • filtering by value,

    • filtering by metadata, such as the timestamp of a value,

    • specifying arguments to zenoh when using the REST API.

    When in string form, selectors look a lot like a URI, with similar semantics:

    • the key_expr before the first ? must be a valid key expression.

    • the parameters after the first ? should be encoded like the query section of a URL:

    Zenoh intends to standardize the usage of a set of parameter names. To avoid conflicting with RPC parameters, the Zenoh team has settled on reserving the set of parameter names that start with non-alphanumeric characters.

    The full specification for selectors is available here, it includes standardized parameters.

    Queryable implementers are encouraged to prefer these standardized parameter names when implementing their associated features, and to prefix their own parameter names to avoid having conflicting parameter names with other queryables.