Liveliness

A structure with functions to declare a LivelinessToken, query existing LivelinessTokens and subscribe to liveliness changes.

A LivelinessToken is a token which liveliness is tied to the Zenoh Session and can be monitored by remote applications.

The Liveliness instance can be obtained with the Session.liveliness function of the Session instance.

Functions

Link copied to clipboard
fun declareSubscriber(keyExpr: KeyExpr, channel: <Error class: unknown class><Sample>, history: Boolean = false, onClose: () -> Unit? = null): <Error class: unknown class><Subscriber<<Error class: unknown class><Sample>>>
fun declareSubscriber(keyExpr: KeyExpr, callback: Callback<Sample>, history: Boolean = false, onClose: () -> Unit? = null): <Error class: unknown class><Subscriber<Unit>>
fun <R> declareSubscriber(keyExpr: KeyExpr, handler: Handler<Sample, R>, history: Boolean = false, onClose: () -> Unit? = null): <Error class: unknown class><Subscriber<R>>

Create a Subscriber for liveliness changes matching the given key expression.

Link copied to clipboard
fun declareToken(keyExpr: KeyExpr): <Error class: unknown class><LivelinessToken>

Create a LivelinessToken for the given key expression.

Link copied to clipboard
fun get(keyExpr: KeyExpr, channel: <Error class: unknown class><Reply>, timeout: Duration = Duration.ofMillis(10000)): <Error class: unknown class><<Error class: unknown class><Reply>>
fun get(keyExpr: KeyExpr, callback: Callback<Reply>, timeout: Duration = Duration.ofMillis(10000)): <Error class: unknown class><Unit>
fun <R> get(keyExpr: KeyExpr, handler: Handler<Reply, R>, timeout: Duration = Duration.ofMillis(10000)): <Error class: unknown class><R>

Query the liveliness tokens with matching key expressions.