java.lang.Object
application.presenter.event.model.roomevent.RoomEvent<E>
Type Parameters:
E - the type of the event payload.
All Implemented Interfaces:
Event<E>

public class RoomEvent<E extends RoomEventPayload> extends Object implements Event<E>
Room environment conditions update event. In addition to a normal Event it has the roomId and the roomType to which the event refers.
  • Constructor Details

    • RoomEvent

      public RoomEvent(String key, String roomId, RoomTypePayload roomType, E data, String dateTime)
      Default constructor.
      Parameters:
      key - the key of the event.
      roomId - the room identification to which the event is related to.
      roomType - the room type to which the event is related to.
      data - the payload.
      dateTime - the date time of the event.
  • Method Details

    • getKey

      public final String getKey()
      Description copied from interface: Event
      Get the key of the event.
      Specified by:
      getKey in interface Event<E extends RoomEventPayload>
      Returns:
      the key.
    • getRoomId

      public String getRoomId()
      Obtain the room id to which the event is related to.
      Returns:
      the room id.
    • getRoomType

      public RoomTypePayload getRoomType()
      Obtain the room type to which the event is related to.
      Returns:
      the room type.
    • getData

      public final E getData()
      Description copied from interface: Event
      Get the data payload of the event.
      Specified by:
      getData in interface Event<E extends RoomEventPayload>
      Returns:
      the data payload.
    • getDateTime

      public final String getDateTime()
      Description copied from interface: Event
      Get the date time in string format.
      Specified by:
      getDateTime in interface Event<E extends RoomEventPayload>
      Returns:
      the string of date time.