public interface NotificationItem
extends java.io.Serializable
BasicNotificationItem
for a default implementation, or derive from this class.Modifier and Type | Method and Description |
---|---|
Agent |
getAgent()
The agent the item is to be destined for.
|
Application |
getApplication()
The application of the item.
|
OrgUnit |
getDept()
The department of the item.
|
org.json.JSONObject |
getJsonPayload()
Returns the JSON representation that is send to the smartclients.
|
java.lang.String |
getTopic()
Returns the topic-suffix to use for smartclient publishing.
|
Application getApplication()
Agent getAgent()
Names.EVERYBODY
.OrgUnit getDept()
java.lang.String getTopic()
Names.EVERYBODY
is being used.
In this case, when the topic starts with "/service", each smartclient/cometd session is notified individually, irrespective,
whether the topic has been subscribed to excplicitly or not. When the prefix of the topic does not start with "/service", then
the notification takes place via a single call to all sessions which subscribed the topic.org.json.JSONObject getJsonPayload()
Names.EVERYBODY
is used as agent together with a topic string not starting with
"/service", the method will get called just once per cluster node).
If it returns null, the item will not be delivered to smartclients.
Beware: JSONObjects do not implement Serializable.
When using an @enterprise cluster,
then at the sending node, do not create instance variables with type JSONObject in
derivations of NotificationItems, but use this method to create the proper JSONObject
from other instance data at the receiving nodes.@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.