Class FirmwareUpdateResultInfo


  • @NonNullByDefault
    public final class FirmwareUpdateResultInfo
    extends Object
    The FirmwareUpdateResultInfo contains information about the result of a firmware update.
    Author:
    Thomas Höfer - Initial contribution, Dimitar Ivanov - Consolidated all the needed information for firmware status events
    • Method Detail

      • createFirmwareUpdateResultInfo

        public static FirmwareUpdateResultInfo createFirmwareUpdateResultInfo​(ThingUID thingUID,
                                                                              FirmwareUpdateResult result,
                                                                              String errorMessage)
        Parameters:
        thingUID - thingUID of the thing being updated
        result - the result of the firmware update (must not be null)
        errorMessage - the error message in case of result is FirmwareUpdateResult.ERROR (must not be null or empty for erroneous firmware updates; ignored for successful firmware updates)
        Returns:
        FirmwareUpdateResultInfo (not null)
        Throws:
        IllegalArgumentException - if error message is null or empty for erroneous firmware updates
      • getResult

        public FirmwareUpdateResult getResult()
        Returns the result of the firmware update.
        Returns:
        the result of the firmware update
      • getThingUID

        public ThingUID getThingUID()
        Returns the thing UID.
        Returns:
        the thing UID
      • getErrorMessage

        public @Nullable String getErrorMessage()
        Returns the error message in case of result is FirmwareUpdateResult.ERROR.
        Returns:
        the error message in case of erroneous firmware updates (is null for successful firmware updates)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(@Nullable Object obj)
        Overrides:
        equals in class Object