Class Query

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

    
    public final class Query
     implements AutoCloseable, ZenohType
                        

    Represents a Zenoh Query in Kotlin.

    A Query is generated within the context of a Queryable, when receiving a Query request.

    • Constructor Detail

    • Method Detail

      • getKeyExpr

         final KeyExpr getKeyExpr()

        The key expression to which the query is associated.

      • getPayload

         final ZBytes getPayload()

        Optional payload in case the received query was declared using "with query".

      • reply

         final Unit reply(KeyExpr keyExpr, IntoZBytes payload, ReplyOptions options)

        Reply to the specified key expression.

        Parameters:
        keyExpr - Key expression to reply to.
        payload - The reply payload.
        options - Optional options for configuring the reply.
      • reply

         final Unit reply(KeyExpr keyExpr, String payload, ReplyOptions options)

        Reply to the specified key expression.

        Parameters:
        keyExpr - Key expression to reply to.
        payload - The reply payload as a string.
        options - Optional options for configuring the reply.
      • replyDel

         final Unit replyDel(KeyExpr keyExpr, ReplyDelOptions options)

        Reply "delete" to the specified key expression.

        Parameters:
        keyExpr - Key expression to reply to.
        options - Optional options for configuring the reply.
      • replyErr

         final Unit replyErr(IntoZBytes message, ReplyErrOptions options)

        Reply "error" to the specified key expression.

        Parameters:
        message - The error message.
        options - Optional options for configuring the reply.
      • replyErr

         final Unit replyErr(String message, ReplyErrOptions options)

        Reply "error" to the specified key expression.

        Parameters:
        message - The error message as a String.
        options - Optional options for configuring the reply.