Package org.jgroups.demos
Class RelayDemoRpc
java.lang.Object
org.jgroups.ReceiverAdapter
org.jgroups.demos.RelayDemoRpc
- All Implemented Interfaces:
MembershipListener,MessageListener,Receiver
Demos RELAY. Create 2 *separate* clusters with RELAY as top protocol. Each RELAY has bridge_props="tcp.xml" (tcp.xml
needs to be present). Then start 2 instances in the first cluster and 2 instances in the second cluster. They should
find each other, and typing in a window should send the text to everyone, plus we should get 4 responses.
- Author:
- Bela Ban
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JChannelprotected RpcDispatcherprotected Addressprotected View -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ch
-
disp
-
local_addr
-
view
-
-
Constructor Details
-
RelayDemoRpc
public RelayDemoRpc()
-
-
Method Details
-
main
- Throws:
Exception
-
start
- Throws:
Exception
-
handleMessage
-
viewAccepted
Description copied from interface:MembershipListenerCalled when a change in membership has occurred. No long running actions or sending of messages should be done in this callback. If some long running action needs to be performed, it should be done in a separate thread. Note that on reception of the first view (a new member just joined), the channel will not yet be in the connected state. This only happens whenChannel.connect(String)returns.- Specified by:
viewAcceptedin interfaceMembershipListener- Overrides:
viewAcceptedin classReceiverAdapter
-