Class Notification
- java.lang.Object
-
- org.forgerock.openig.tools.notifications.Notification
-
public final class Notification extends Object
ANotification
is a special message that AM send to its "agents" to notify the occurrence of an event.
-
-
Constructor Summary
Constructors Constructor Description Notification(Instant timestamp, String topic, JsonValue body)
Creates a notification that happened attimestamp
, on the giventopic
with the givenbody
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonValue
getBody()
Returns the notification's payload.Instant
getTimestamp()
Returns the instant when the event happened on the AM server.String
getTopic()
Returns the notification's topic.String
toString()
-
-
-
Constructor Detail
-
Notification
public Notification(Instant timestamp, String topic, JsonValue body)
Creates a notification that happened attimestamp
, on the giventopic
with the givenbody
.- Parameters:
timestamp
- when the event was triggered on AMtopic
- category of the notificationbody
- 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.
-
-