Class ClientNotificationAddress
java.lang.Object
org.eclipse.scout.rt.shared.clientnotification.ClientNotificationAddress
- All Implemented Interfaces:
Serializable
,IClientNotificationAddress
Determines how the client notification needs to be dispatched and handled. A client notification can be addressed to
- all nodes
- all sessions
- one or more specific sessions
- one or more specific users
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Only one of the following expression must evaluate to true (listed in order of evaluation in ClientNotificationDispatcher): notifyAllNodes notifyAllSessions !CollectionUtility.isEmpty(sessionIds) !CollectionUtility.isEmpty(userIds) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientNotificationAddress
Create an address for a notification that should to be handled once per client node.static ClientNotificationAddress
Create an address for a notification that should to be handled once for each session.static ClientNotificationAddress
createSessionAddress
(Set<String> sessionIds) Create an address for a notification that should to be handled once for each of the given sessions.static ClientNotificationAddress
createUserAddress
(Set<String> userIds) Create an address for a notification that should to be handled once for each of the given users.boolean
int
hashCode()
boolean
boolean
toString()
protected ClientNotificationAddress
withNotifyAllNodes
(boolean notifyAllNodes) protected ClientNotificationAddress
withNotifyAllSessions
(boolean notifyAllSessions) protected ClientNotificationAddress
withSessionIds
(Set<String> sessionIds) protected ClientNotificationAddress
withUserIds
(Set<String> userIds) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.scout.rt.shared.clientnotification.IClientNotificationAddress
prettyPrint
-
Constructor Details
-
ClientNotificationAddress
protected ClientNotificationAddress()Only one of the following expression must evaluate to true (listed in order of evaluation in ClientNotificationDispatcher):- notifyAllNodes
- notifyAllSessions
- !CollectionUtility.isEmpty(sessionIds)
- !CollectionUtility.isEmpty(userIds)
-
-
Method Details
-
createSessionAddress
Create an address for a notification that should to be handled once for each of the given sessions.- Parameters:
sessionIds
- the ids of the users for this address seeISession.getId()
- Returns:
- notification address
-
createUserAddress
Create an address for a notification that should to be handled once for each of the given users.- Parameters:
userIds
- the ids of the users for this address seeISession.getUserId()
- Returns:
- notification address
-
createAllSessionsAddress
Create an address for a notification that should to be handled once for each session.- Returns:
- notification address
-
createAllNodesAddress
Create an address for a notification that should to be handled once per client node.- Returns:
- notification address
-
getSessionIds
- Specified by:
getSessionIds
in interfaceIClientNotificationAddress
- Returns:
- the sessions for which this client notification should be dispatched.
-
getUserIds
- Specified by:
getUserIds
in interfaceIClientNotificationAddress
- Returns:
- the userIds for which this client notification should be dispatched.
-
isNotifyAllSessions
public boolean isNotifyAllSessions()- Specified by:
isNotifyAllSessions
in interfaceIClientNotificationAddress
- Returns:
true
, if a notification should be dispatched once for every available session,false
otherwise.
-
isNotifyAllNodes
public boolean isNotifyAllNodes()- Specified by:
isNotifyAllNodes
in interfaceIClientNotificationAddress
- Returns:
true
, if a notification should be dispatched once per UI server node,false
otherwise.
-
toString
-
hashCode
public int hashCode() -
equals
-
withSessionIds
-
withUserIds
-
withNotifyAllSessions
-
withNotifyAllNodes
-