Class ChannelTriggeredEvent

java.lang.Object
org.openhab.core.events.AbstractEvent
org.openhab.core.thing.events.ChannelTriggeredEvent
All Implemented Interfaces:
Event

@NonNullByDefault public class ChannelTriggeredEvent extends AbstractEvent
ChannelTriggeredEvents can be used to deliver triggers through the openHAB event bus. Trigger events must be created with the ThingEventFactory.
Author:
Moritz Kammerer - Initial contribution
  • Field Details

    • TYPE

      public static final String TYPE
      The thing trigger event type.
  • Constructor Details

    • ChannelTriggeredEvent

      protected ChannelTriggeredEvent(String topic, String payload, @Nullable String source, String event, ChannelUID channel)
      Constructs a new thing trigger event.
      Parameters:
      topic - the topic. The topic includes the thing UID, see ThingEventFactory.CHANNEL_TRIGGERED_EVENT_TOPIC
      payload - the payload. Contains a serialized ThingEventFactory.TriggerEventPayloadBean.
      source - the source
      event - the event
      channel - the channel which triggered the event
  • Method Details

    • getType

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

      public String getEvent()
      Returns the event.
      Returns:
      the event
    • getChannel

      public ChannelUID getChannel()
      Returns:
      the channel which triggered the event
    • toString

      public String toString()
      Overrides:
      toString in class Object