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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
Selector.Companion
-
Field Summary
Fields Modifier and Type Field Description private final KeyExpr
keyExpr
private final Parameters
parameters
public final static Selector.Companion
Companion
-
Constructor Summary
Constructors Constructor Description Selector(KeyExpr keyExpr, Parameters parameters)
-
Method Summary
Modifier and Type Method Description final KeyExpr
getKeyExpr()
The KeyExpr of the selector. final Parameters
getParameters()
The Parameters of the selector. Selector
into()
String
toString()
Unit
close()
Closes the selector's KeyExpr. -
-
Constructor Detail
-
Selector
Selector(KeyExpr keyExpr, Parameters parameters)
-
-
Method Detail
-
getKeyExpr
final KeyExpr getKeyExpr()
The KeyExpr of the selector.
-
getParameters
final Parameters getParameters()
The Parameters of the selector.
-
-
-
-