Class Notification


  • public final class Notification
    extends Object
    A Notification is a special message that AM send to its "agents" to notify the occurrence of an event.
    • Constructor Detail

      • Notification

        public Notification​(Instant timestamp,
                            String topic,
                            JsonValue body)
        Creates a notification that happened at timestamp, on the given topic with the given body.
        Parameters:
        timestamp - when the event was triggered on AM
        topic - category of the notification
        body - the JSON payload (a non-null JSON object)
    • Method Detail

      • getTimestamp

        public Instant getTimestamp()
        Returns the instant when the event happened on the AM server.
        Returns:
        the instant when the event happened on the AM server.
      • getTopic

        public String getTopic()
        Returns the notification's topic.
        Returns:
        the notification's topic.
      • getBody

        public JsonValue getBody()
        Returns the notification's payload.
        Returns:
        the notification's payload.