Class Notification
- java.lang.Object
-
- org.forgerock.openig.tools.notifications.Notification
-
public final class Notification extends Object
ANotificationis 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 giventopicwith the givenbody.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonValuegetBody()Returns the notification's payload.InstantgetTimestamp()Returns the instant when the event happened on the AM server.StringgetTopic()Returns the notification's topic.StringtoString()
-
-
-
Constructor Detail
-
Notification
public Notification(Instant timestamp, String topic, JsonValue body)
Creates a notification that happened attimestamp, on the giventopicwith 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.
-
-