Class ChannelTriggeredEvent

  • All Implemented Interfaces:
    Event

    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 Detail

      • TYPE

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

      • ChannelTriggeredEvent

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

      • getEvent

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

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

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