Class Notification


  • public class Notification
    extends Object
    Information about the push notification.
    • Field Detail

      • eventId

        private String eventId
        The Matrix event ID of the event being notified about. This is required if the notification is about a particular Matrix event. It may be omitted for notifications that only contain updated badge counts. This ID can and should be used to detect duplicate notification requests.
      • roomId

        private String roomId
        The ID of the room in which this event occurred. Required if the notification relates to a specific Matrix event.
      • type

        private String type
        The type of the event as in the event's type field.
      • sender

        private String sender
        The sender of the event as in the corresponding event field.
      • senderDisplayName

        private String senderDisplayName
        The current display name of the sender in the room in which the event occurred.
      • roomName

        private String roomName
        The name of the room in which the event occurred.
      • roomAlias

        private String roomAlias
        An alias to display for the room in which the event occurred.
      • userIsTarget

        private Boolean userIsTarget
        This is true if the user receiving the notification is the subject of a member event (i.e. the state_key of the member event is equal to the user's Matrix ID).
      • prio

        private String prio
        The priority of the notification. If omitted, high is assumed. This may be used by push gateways to deliver less time-sensitive notifications in a way that will preserve battery power on mobile devices. One of: ["high", "low"].
      • content

        private EventContent content
        The content field from the event, if present. If the event had no content field, this field is omitted.
      • counts

        private Counts counts
        This is a dictionary of the current number of unacknowledged communications for the recipient user. Counts whose value is zero are omitted.
      • devices

        private List<Device> devices
        Required. This is an array of devices that the notification should be sent to.
    • Constructor Detail

      • Notification

        public Notification()
    • Method Detail

      • getEventId

        public String getEventId()
      • setEventId

        public void setEventId​(String eventId)
      • getRoomId

        public String getRoomId()
      • setRoomId

        public void setRoomId​(String roomId)
      • getType

        public String getType()
      • setType

        public void setType​(String type)
      • getSender

        public String getSender()
      • setSender

        public void setSender​(String sender)
      • getSenderDisplayName

        public String getSenderDisplayName()
      • setSenderDisplayName

        public void setSenderDisplayName​(String senderDisplayName)
      • getRoomName

        public String getRoomName()
      • setRoomName

        public void setRoomName​(String roomName)
      • getRoomAlias

        public String getRoomAlias()
      • setRoomAlias

        public void setRoomAlias​(String roomAlias)
      • getUserIsTarget

        public Boolean getUserIsTarget()
      • setUserIsTarget

        public void setUserIsTarget​(Boolean userIsTarget)
      • getPrio

        public String getPrio()
      • setPrio

        public void setPrio​(String prio)
      • setContent

        public void setContent​(EventContent content)
      • getCounts

        public Counts getCounts()
      • setCounts

        public void setCounts​(Counts counts)
      • setDevices

        public void setDevices​(List<Device> devices)