org.jgroups.demos
Class QuoteClient
Frame
org.jgroups.demos.QuoteClient
- ActionListener, WindowListener, MembershipListener
public class QuoteClient
extends Frame
Used in conjunction with QuoteServer: a client is member of a group of quote servers which replicate
stock quotes among themselves. The client broadcasts its request (set, get quotes) and (in the case of get
waits for the first reply received (usually the one from the quote server closest to it). The client
can get and set quotes as long as a minimum of 1 server (in the group) is running.
QuoteClient
public QuoteClient()
actionPerformed
public void actionPerformed(ActionEvent e)
block
public void block()
Block sending and receiving of messages until viewAccepted() is called
- block in interface MembershipListener
main
public static void main(args[] )
viewAccepted
public void viewAccepted(View new_view)
Called by JGroups to notify the target object of a change of membership.
No long running actions should be done in this callback in the case of Ensemble,
as this would block Ensemble. If some long running action needs to be performed,
it should be done in a separate thread (cf. ../Tests/QuoteServer.java
).
- viewAccepted in interface MembershipListener
windowActivated
public void windowActivated(WindowEvent e)
windowClosed
public void windowClosed(WindowEvent e)
windowClosing
public void windowClosing(WindowEvent e)
windowDeactivated
public void windowDeactivated(WindowEvent e)
windowDeiconified
public void windowDeiconified(WindowEvent e)
windowIconified
public void windowIconified(WindowEvent e)
windowOpened
public void windowOpened(WindowEvent e)
Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.