Interface Characteristic

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getType()  
      void setValue​(javax.json.JsonValue jsonValue)
      Invoked by the remote client, this updates the current value of the characteristic.
      void supplyValue​(javax.json.JsonObjectBuilder characteristicBuilder)
      Adds an attribute to the passed JsonObjectBuilder named "value" with the current value of the characteristic.
      java.util.concurrent.CompletableFuture<javax.json.JsonObject> toJson​(int iid)
      Creates the JSON representation of the characteristic, in accordance with the HomeKit Accessory Protocol.
    • Method Detail

      • getType

        java.lang.String getType()
        Returns:
        The UUID type for this characteristic.
      • supplyValue

        void supplyValue​(javax.json.JsonObjectBuilder characteristicBuilder)
        Adds an attribute to the passed JsonObjectBuilder named "value" with the current value of the characteristic.
        Parameters:
        characteristicBuilder - the JsonObjectBuilder to add the value attribute to.
      • toJson

        java.util.concurrent.CompletableFuture<javax.json.JsonObject> toJson​(int iid)
        Creates the JSON representation of the characteristic, in accordance with the HomeKit Accessory Protocol.
        Parameters:
        iid - The instance ID of the characteristic to be included in the serialization.
        Returns:
        the future completing with the resulting JSON.
      • setValue

        void setValue​(javax.json.JsonValue jsonValue)
        Invoked by the remote client, this updates the current value of the characteristic.
        Parameters:
        jsonValue - the JSON serialized value to set.