|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
NotificationListener allows an application to listen for "notification" items for the logged-in user. Notification items are created by the Server to notify a user of certain process-related events. For example, when a new Change Request is created, the Server will create a notification item for the user specified in the Responsibility field.
The act of retrieving the notification items from the Server for a particular User, View and Type clears those notification items on the Server. This is true whether the notification items are retrieved directly, via View.getNewNotificationItems(), or indirectly, via a NotificationListener. Once a notification item is retrieved in one application context, it will not be seen in any other application context.
If an application calls View.getNewNotificationItems() while also having a registered NotificationListener, each new notification will be seen either via getNewNotificationItems() or via the NotificationListener, but not both. Which will receive any given notification item is not predictable.
When an application registers a NotificationListener (for example, via View.addItemListener), any pending notification items will immediately trigger NotificationEvents. Thus, if an application registers a NotificationListener, it should not need to call View.getNewNotificationItems() directly.
An application may register any number of NotificationListeners with the same View object (or with Folder or ItemListManager objects derived from that View object), and they will all be triggered as appropriate for each NotificationEvent. However, if NotificationListeners are registered with multiple View objects with the same ViewID (in the same logged-in user context), only one of the View's NotificationListeners will be triggered (for that item Type).
When a NotificationListener is registered via Folder.addItemListener() or ItemListManager.addItemListener(), NotificationEvents may be filtered out (for example, if the associated Item is not within the specified Folder scope, or does not pass the ItemListManager's registered Filter). This filtering occurs after the notification items are retrieved from the Server. Thus, if an application registers a NotificationListener at the Folder or ItemListManager level, but not at the View level, it is possible to filter out some NotificationEvents such that they are never seen by any application.
If multiple applications are attempting to retrieve the notification items for a particular User and View, each new notification will only be seen by one application. Which will receive any given notification item is not predictable.
NotificationAdapter,
View.addItemListener(com.starbase.starteam.IItemListener, com.starbase.starteam.Type),
Folder.addItemListener(com.starbase.starteam.IItemListener, com.starbase.starteam.Type, int),
ItemListManager.addItemListener(com.starbase.starteam.IItemListener)| Method Summary | |
void |
notify(NotificationEvent e)
Invoked whenever a new "notification" for the logged-in user is available on the Server. |
| Method Detail |
public void notify(NotificationEvent e)
e - The corresponding Notification event.NotificationEvent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||