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.Serializable
getCache()
Called on the coordinator to obtains its cachevoid
handleNotification(java.io.Serializable n)
static void
main(java.lang.String[] args)
void
memberJoined(Address mbr)
void
memberLeft(Address mbr)
void
start(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:
handleNotification
in interfaceNotificationBus.Consumer
-
getCache
public java.io.Serializable getCache()
Description copied from interface:NotificationBus.Consumer
Called on the coordinator to obtains its cache- Specified by:
getCache
in interfaceNotificationBus.Consumer
-
memberJoined
public void memberJoined(Address mbr)
- Specified by:
memberJoined
in interfaceNotificationBus.Consumer
-
memberLeft
public void memberLeft(Address mbr)
- Specified by:
memberLeft
in interfaceNotificationBus.Consumer
-
main
public static void main(java.lang.String[] args)
-
-