Interface FirmwareUpdateHandler

  • All Known Subinterfaces:
    FirmwareUpdateBackgroundTransferHandler
    All Known Implementing Classes:
    MagicFirmwareUpdateThingHandler

    @NonNullByDefault
    public interface FirmwareUpdateHandler
    The FirmwareUpdateHandler can be implemented and registered as an OSGi service in order to update the firmware for the physical device of a Thing. The FirmwareUpdateService tracks each firmware update handler and starts the firmware update process by the operation FirmwareUpdateService#updateFirmware(org.eclipse.smarthome.core.thing.ThingUID, FirmwareUID, java.util.Locale) .
    Author:
    Thomas Höfer - Initial contribution
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cancel()
      Cancels a previous started firmware update.
      Thing getThing()
      Returns the Thing that is handled by this firmware update handler.
      boolean isUpdateExecutable()
      Returns true, if this firmware update handler is in a state in which the firmware update can be executed, otherwise false (e.g.
      void updateFirmware​(Firmware firmware, ProgressCallback progressCallback)
      Updates the firmware for the physical device of the thing that is handled by this firmware update handler.
    • Method Detail

      • getThing

        Thing getThing()
        Returns the Thing that is handled by this firmware update handler.
        Returns:
        the thing that is handled by this firmware update handler (not null)
      • updateFirmware

        void updateFirmware​(Firmware firmware,
                            ProgressCallback progressCallback)
        Updates the firmware for the physical device of the thing that is handled by this firmware update handler.
        Parameters:
        firmware - the new firmware to be updated (not null)
        progressCallback - the progress callback to send progress information of the firmware update process (not null)
      • cancel

        void cancel()
        Cancels a previous started firmware update.
      • isUpdateExecutable

        boolean isUpdateExecutable()
        Returns true, if this firmware update handler is in a state in which the firmware update can be executed, otherwise false (e.g. the thing is ThingStatus.OFFLINE or its status detail is already {@link ThingStatusDetail#FIRMWARE_UPDATING.)
        Returns:
        true, if this firmware update handler is in a state in which the firmware update can be executed, otherwise false