Class ItemStateEvent

  • All Implemented Interfaces:
    Event

    public class ItemStateEvent
    extends AbstractEvent
    ItemStateEvents can be used to deliver item status updates through the openHAB event bus. State events must be created with the ItemEventFactory.
    Author:
    Stefan Bußweiler - Initial contribution
    • Field Detail

      • TYPE

        public static final String TYPE
        The item state event type.
    • Constructor Detail

      • ItemStateEvent

        protected ItemStateEvent​(String topic,
                                 String payload,
                                 String itemName,
                                 State itemState,
                                 String source)
        Constructs a new item state event.
        Parameters:
        topic - the topic
        payload - the payload
        itemName - the item name
        itemState - the item state
        source - the source, can be null
    • Method Detail

      • getType

        public String getType()
        Description copied from interface: Event
        Gets the event type.
        Returns:
        the event type
      • getItemName

        public String getItemName()
        Gets the item name.
        Returns:
        the item name
      • getItemState

        public State getItemState()
        Gets the item state.
        Returns:
        the item state