Class AbstractItemRegistryEvent

java.lang.Object
org.openhab.core.events.AbstractEvent
org.openhab.core.items.events.AbstractItemRegistryEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
ItemAddedEvent, ItemRemovedEvent, ItemUpdatedEvent

@NonNullByDefault public abstract class AbstractItemRegistryEvent extends AbstractEvent
Abstract implementation of an item registry event which will be posted by the ItemRegistry for added, removed and updated items.
Author:
Stefan Bußweiler - Initial contribution
  • Constructor Details

    • AbstractItemRegistryEvent

      protected AbstractItemRegistryEvent(String topic, String payload, @Nullable String source, ItemDTO item)
      Must be called in subclass constructor to create a new item registry event.
      Parameters:
      topic - the topic
      payload - the payload
      source - the source
      item - the item data transfer object
  • Method Details

    • getItem

      public ItemDTO getItem()
      Gets the item.
      Returns:
      the item