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()
Called whenever the member needs to stop sending messages.
When the next view is received (viewAccepted()), the member can resume sending
messages. If a member does not comply, the message(s) sent between a block()
and a matching viewAccepted() callback will probably be delivered in the next view.
The block() callback is only needed by the Virtual Synchrony suite of protocols
(FLUSH protocol)3.2, otherwise it will never be invoked.
- block in interface MembershipListener
main
public static void main(args[] )
suspect
public void suspect(Address suspected_mbr)
Called whenever a member is suspected of having crashed,
but has not yet been excluded.
- suspect in interface MembershipListener
viewAccepted
public void viewAccepted(View new_view)
Called when a change in membership has occurred.
No long running actions should be done in this callback.
If some long running action needs to be performed, it should be done in a separate thread.
- 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) 1998-2005 Bela Ban. All Rights Reserved.