Methods Summary |
---|
public java.util.Collection | getReceivedNotifications()Lists the notifications received on the cluster partition
return messages_;
|
public void | sendTextMessage(java.lang.String message)Broadcasts a notification to the cluster partition.
This example does not ensure that a notification sequence number
is unique throughout the partition.
long now = System.currentTimeMillis();
Notification notification =
new Notification("hanotification.example.counter", super.getServiceName(), now, now, message);
sendNotification(notification);
|
protected void | startService()On service start, subscribes to notification sent by this broadcaster or its remote peers.
super.startService();
addNotificationListener(listener_, /* no need for filter */ null, /* no handback object */ null);
|
protected void | stopService()On service stop, unsubscribes to notification sent by this broadcaster or its remote peers.
removeNotificationListener(listener_);
super.stopService();
|