urv.app.samples
Class Draw
java.lang.Object
org.jgroups.ExtendedReceiverAdapter
urv.app.samples.Draw
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, org.jgroups.ChannelListener, org.jgroups.ExtendedMembershipListener, org.jgroups.ExtendedMessageListener, org.jgroups.ExtendedReceiver, org.jgroups.MembershipListener, org.jgroups.MessageListener, org.jgroups.Receiver
public class Draw
- extends org.jgroups.ExtendedReceiverAdapter
- implements java.awt.event.ActionListener, org.jgroups.ChannelListener
Shared whiteboard, each new instance joins the same group. Each instance chooses a random color,
mouse moves are broadcast to all group members, which then apply them to their canvas
- Author:
- Bela Ban, Oct 17 2001
Field Summary |
(package private) static boolean |
first
|
(package private) java.lang.String |
groupname
|
(package private) boolean |
jmx
|
(package private) boolean |
no_channel
|
Constructor Summary |
Draw(java.lang.String props,
boolean no_channel,
boolean jmx,
boolean use_state,
long state_timeout)
|
Methods inherited from class org.jgroups.ExtendedReceiverAdapter |
getState, getState, setState, setState, suspect |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
groupname
java.lang.String groupname
first
static final boolean first
- See Also:
- Constant Field Values
no_channel
boolean no_channel
jmx
boolean jmx
Draw
public Draw(java.lang.String props,
boolean no_channel,
boolean jmx,
boolean use_state,
long state_timeout)
throws java.lang.Exception
- Throws:
java.lang.Exception
getGroupName
public java.lang.String getGroupName()
setGroupName
public void setGroupName(java.lang.String groupname)
main
public static void main(java.lang.String[] args)
help
static void help()
go
public void go()
throws java.lang.Exception
- Throws:
java.lang.Exception
setTitle
void setTitle(java.lang.String title)
setTitle
void setTitle()
receive
public void receive(org.jgroups.Message msg)
- Specified by:
receive
in interface org.jgroups.MessageListener
- Overrides:
receive
in class org.jgroups.ExtendedReceiverAdapter
viewAccepted
public void viewAccepted(org.jgroups.View v)
- Specified by:
viewAccepted
in interface org.jgroups.MembershipListener
- Overrides:
viewAccepted
in class org.jgroups.ExtendedReceiverAdapter
block
public void block()
- Specified by:
block
in interface org.jgroups.MembershipListener
- Overrides:
block
in class org.jgroups.ExtendedReceiverAdapter
unblock
public void unblock()
- Specified by:
unblock
in interface org.jgroups.ExtendedMembershipListener
- Overrides:
unblock
in class org.jgroups.ExtendedReceiverAdapter
getState
public byte[] getState()
- Specified by:
getState
in interface org.jgroups.MessageListener
- Overrides:
getState
in class org.jgroups.ExtendedReceiverAdapter
setState
public void setState(byte[] state)
- Specified by:
setState
in interface org.jgroups.MessageListener
- Overrides:
setState
in class org.jgroups.ExtendedReceiverAdapter
getState
public void getState(java.io.OutputStream ostream)
- Specified by:
getState
in interface org.jgroups.ExtendedMessageListener
- Overrides:
getState
in class org.jgroups.ExtendedReceiverAdapter
setState
public void setState(java.io.InputStream istream)
- Specified by:
setState
in interface org.jgroups.ExtendedMessageListener
- Overrides:
setState
in class org.jgroups.ExtendedReceiverAdapter
clearPanel
public void clearPanel()
sendClearPanelMsg
public void sendClearPanelMsg()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
stop
public void stop()
channelConnected
public void channelConnected(org.jgroups.Channel channel)
- Specified by:
channelConnected
in interface org.jgroups.ChannelListener
channelDisconnected
public void channelDisconnected(org.jgroups.Channel channel)
- Specified by:
channelDisconnected
in interface org.jgroups.ChannelListener
channelClosed
public void channelClosed(org.jgroups.Channel channel)
- Specified by:
channelClosed
in interface org.jgroups.ChannelListener
channelShunned
public void channelShunned()
- Specified by:
channelShunned
in interface org.jgroups.ChannelListener
channelReconnected
public void channelReconnected(org.jgroups.Address addr)
- Specified by:
channelReconnected
in interface org.jgroups.ChannelListener