Class AbstractThingRegistryEvent

java.lang.Object
org.openhab.core.events.AbstractEvent
org.openhab.core.thing.events.AbstractThingRegistryEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
ThingAddedEvent, ThingRemovedEvent, ThingUpdatedEvent

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

    • AbstractThingRegistryEvent

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

    • getThing

      public ThingDTO getThing()
      Gets the thing data transfer object.
      Returns:
      the thing data transfer object