Class FirmwareEventFactory

    • Constructor Detail

      • FirmwareEventFactory

        public FirmwareEventFactory()
        Creates a new firmware event factory.
    • Method Detail

      • createEventByType

        protected Event createEventByType​(String eventType,
                                          String topic,
                                          String payload,
                                          @Nullable String source)
                                   throws Exception
        Description copied from class: AbstractEventFactory
        Create a new event instance based on the event type.
        Specified by:
        createEventByType in class AbstractEventFactory
        Parameters:
        eventType - the event type
        topic - the topic
        payload - the payload
        source - the source, can be null
        Returns:
        the created event instance
        Throws:
        Exception - if the creation of the event fails
      • createFirmwareStatusInfoEvent

        public static FirmwareStatusInfoEvent createFirmwareStatusInfoEvent​(FirmwareStatusInfo firmwareStatusInfo)
        Parameters:
        firmwareStatusInfo - the firmware status information (must not be null)
        thingUID - the thing UID for which the new firmware status info is to be sent (must not be null)
        Returns:
        the corresponding firmware status info event
        Throws:
        IllegalArgumentException - if given firmware status info is null
      • createFirmwareUpdateResultInfoEvent

        public static FirmwareUpdateResultInfoEvent createFirmwareUpdateResultInfoEvent​(FirmwareUpdateResultInfo firmwareUpdateResultInfo)
        Parameters:
        firmwareUpdateResultInfo - the firmware update result information (must not be null)
        thingUID - the thing UID for which the result information is to be sent (must not be null)
        Returns:
        the corresponding firmware update result info event
        Throws:
        IllegalArgumentException - if given firmware update result info event is null