public interface NotificationCenter
Object[]
with a notification.Modifier and Type | Method and Description |
---|---|
void |
publish(String messageName,
Object... payload)
Post a notification to all NotificationObserver which are registered with the given String.
|
void |
subscribe(String messageName,
NotificationObserver observer)
Add an observer to the NotificationCenter which gets notifications for the given String.
|
void |
unsubscribe(NotificationObserver observer)
Remove all registrations of an NotificationObserver.
|
void |
unsubscribe(String messageName,
NotificationObserver observer)
Removes an observer from the NotificationCenter.
|
void subscribe(String messageName, NotificationObserver observer)
messageName
- key of the notification to listenobserver
- which listens for the notificationvoid unsubscribe(String messageName, NotificationObserver observer)
messageName
- key of the notification to removeobserver
- which listens for the notificationvoid unsubscribe(NotificationObserver observer)
observer
- for remove all notificationsvoid publish(String messageName, Object... payload)
messageName
- of the notification which sould be sendpayload
- which should be passedCopyright © 2015 Saxonia Systems AG. All rights reserved.