Class ItemCommandEvent

All Implemented Interfaces:
Event

@NonNullByDefault public class ItemCommandEvent extends ItemEvent
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 Details

    • TYPE

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

    • ItemCommandEvent

      protected ItemCommandEvent(String topic, String payload, String itemName, Command command, @Nullable 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 Details

    • getType

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

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

      public String toString()
      Overrides:
      toString in class Object