public class NotificationManager extends java.lang.Object implements INotificationManager
Constructor and Description |
---|
NotificationManager(IParticipant participant) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(INotificationListener listener,
java.util.concurrent.Executor executor) |
IIdentifier |
createNotificationIdentifier(java.lang.String name)
create a locally unique identifier with the participant as the owner
|
boolean |
hasListeners() |
void |
notify(IIdentifier participantId,
INotification notification)
send the notifiction out to some participant, or all if id is null (but you
should probably use IIdentifier.ALL for clarity)
|
void |
post(INotification notification)
post a notification internally, firing the listeners
|
void |
removeListener(INotificationListener listener) |
public NotificationManager(IParticipant participant)
public void addListener(INotificationListener listener, java.util.concurrent.Executor executor)
addListener
in interface INotificationManager
public boolean hasListeners()
hasListeners
in interface INotificationManager
public void removeListener(INotificationListener listener)
removeListener
in interface INotificationManager
public void notify(IIdentifier participantId, INotification notification)
notify
in interface INotificationManager
participantId
- notification
- public void post(INotification notification)
INotificationManager
post
in interface INotificationManager
public IIdentifier createNotificationIdentifier(java.lang.String name)
INotificationManager
createNotificationIdentifier
in interface INotificationManager