Package org.jgroups.demos
Class NotificationBusDemo
- java.lang.Object
-
- org.jgroups.demos.NotificationBusDemo
-
- All Implemented Interfaces:
NotificationBus.Consumer
public class NotificationBusDemo extends java.lang.Object implements NotificationBus.Consumer
Demoes the NotificationBus (without caching). Start a number of members and type in messages. All members will receive the messages. View changes will also be displayed (e.g. member joined, left).- Author:
- Bela Ban
-
-
Constructor Summary
Constructors Constructor Description NotificationBusDemo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.SerializablegetCache()Called on the coordinator to obtains its cachevoidhandleNotification(java.io.Serializable n)static voidmain(java.lang.String[] args)voidmemberJoined(Address mbr)voidmemberLeft(Address mbr)voidstart(java.lang.String bus_name, java.lang.String props)
-
-
-
Method Detail
-
start
public void start(java.lang.String bus_name, java.lang.String props)
-
handleNotification
public void handleNotification(java.io.Serializable n)
- Specified by:
handleNotificationin interfaceNotificationBus.Consumer
-
getCache
public java.io.Serializable getCache()
Description copied from interface:NotificationBus.ConsumerCalled on the coordinator to obtains its cache- Specified by:
getCachein interfaceNotificationBus.Consumer
-
memberJoined
public void memberJoined(Address mbr)
- Specified by:
memberJoinedin interfaceNotificationBus.Consumer
-
memberLeft
public void memberLeft(Address mbr)
- Specified by:
memberLeftin interfaceNotificationBus.Consumer
-
main
public static void main(java.lang.String[] args)
-
-