com.microsoft.tfs.core.util.notifications
Interface NotificationManager

All Superinterfaces:
com.microsoft.tfs.util.Closable
All Known Implementing Classes:
MessageWindowNotificationManager

public interface NotificationManager
extends com.microsoft.tfs.util.Closable

Sends and receives intra- and inter-process notification messages. The scope of message delivery is determined by the implementation.

Always call close() to ensure system resources are released and references to listeners are removed.


Method Summary
 void addListener(NotificationListener listener)
          Adds a notification listener.
 void close()
          
 void removeListener(NotificationListener listener)
          Removes a notification listener.
 void sendNotification(Notification notification, int param1, int param2)
          Sends a Notification.
 

Method Detail

addListener

void addListener(NotificationListener listener)
Adds a notification listener.

Parameters:
listener - the listener to add

removeListener

void removeListener(NotificationListener listener)
Removes a notification listener.

Parameters:
listener - the listener to remove

close

void close()

Closing a NotificationManager flushes the send queue and removes all listeners.

Specified by:
close in interface com.microsoft.tfs.util.Closable

sendNotification

void sendNotification(Notification notification,
                      int param1,
                      int param2)
Sends a Notification. The message may be queued before being sent.

Parameters:
notification - the notification to send (must not be null)
param1 - the first parameter to send
param2 - the second parameter to send


© 2015 Microsoft. All rights reserved.