public class JGroupsChannel
extends org.jgroups.ReceiverAdapter
| Constructor and Description |
|---|
JGroupsChannel(org.jgroups.JChannel jchannel,
String clusterName)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBroadcaster(org.atmosphere.cpr.Broadcaster broadcaster)
Adds/replaces the broadcaster to the JGroupsChannel
|
void |
destroy()
Shutdown the cluster.
|
void |
init()
Connect to the cluster
|
void |
receive(org.jgroups.Message jgroupMessage) |
void |
removeBroadcaster(org.atmosphere.cpr.Broadcaster broadcaster)
Removes the broadcaster from the JGroupsChannel
|
void |
send(String topic,
Object message)
Called from a ClusterBroadcastFilter filter() method
to send the message over to other Atmosphere cluster nodes
|
public JGroupsChannel(org.jgroups.JChannel jchannel,
String clusterName)
jchannel - unconnected JGroups JChannel objectclusterName - name of the group to connect the JChannel topublic void destroy()
public void receive(org.jgroups.Message jgroupMessage)
receive in interface org.jgroups.MessageListenerreceive in class org.jgroups.ReceiverAdapterpublic void send(String topic, Object message)
topic - message - public void addBroadcaster(org.atmosphere.cpr.Broadcaster broadcaster)
broadcaster - public void removeBroadcaster(org.atmosphere.cpr.Broadcaster broadcaster)
broadcaster - Copyright © 2015. All Rights Reserved.