Class ItemCommandEvent

  • All Implemented Interfaces:
    Event

    public class ItemCommandEvent
    extends AbstractEvent
    ItemCommandEvents can be used to deliver commands through the openHAB event bus. Command events must be created with the ItemEventFactory.
    Author:
    Stefan Bußweiler - Initial contribution
    • Field Detail

      • TYPE

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

      • ItemCommandEvent

        protected ItemCommandEvent​(String topic,
                                   String payload,
                                   String itemName,
                                   Command command,
                                   String source)
        Constructs a new item command event object.
        Parameters:
        topic - the topic
        payload - the payload
        itemName - the item name
        command - the command
        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
      • getItemCommand

        public Command getItemCommand()
        Gets the item command.
        Returns:
        the item command