|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.ReceiverAdapter
org.jgroups.demos.Draw
public class Draw
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
| Constructor Summary | |
|---|---|
Draw(Channel channel)
|
|
Draw(Channel channel,
boolean use_state,
long state_timeout)
|
|
Draw(java.lang.String props,
boolean no_channel,
boolean jmx,
boolean use_state,
long state_timeout,
boolean use_unicasts,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
channelClosed(Channel channel)
Channel has been closed notification callback |
void |
channelConnected(Channel channel)
Channel has been connected notification callback |
void |
channelDisconnected(Channel channel)
Channel has been disconnected notification callback |
void |
clearPanel()
|
java.lang.String |
getGroupName()
|
void |
getState(java.io.OutputStream ostream)
Allows an application to write a state through a provided OutputStream. |
void |
go()
|
static void |
main(java.lang.String[] args)
|
void |
receive(Message msg)
Called when a message is received. |
void |
sendClearPanelMsg()
|
void |
setGroupName(java.lang.String groupname)
|
void |
setState(java.io.InputStream istream)
Allows an application to read a state through a provided InputStream. |
void |
stop()
|
void |
viewAccepted(View v)
Called when a change in membership has occurred. |
| Methods inherited from class org.jgroups.ReceiverAdapter |
|---|
block, suspect, unblock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Draw(java.lang.String props,
boolean no_channel,
boolean jmx,
boolean use_state,
long state_timeout,
boolean use_unicasts,
java.lang.String name)
throws java.lang.Exception
java.lang.Exception
public Draw(Channel channel)
throws java.lang.Exception
java.lang.Exception
public Draw(Channel channel,
boolean use_state,
long state_timeout)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public java.lang.String getGroupName()
public void setGroupName(java.lang.String groupname)
public static void main(java.lang.String[] args)
public void go()
throws java.lang.Exception
java.lang.Exceptionpublic void receive(Message msg)
ReceiverAdapter
receive in interface MessageListenerreceive in class ReceiverAdapterpublic void viewAccepted(View v)
ReceiverAdapterChannel.connect(String) returns.
viewAccepted in interface MembershipListenerviewAccepted in class ReceiverAdapter
public void getState(java.io.OutputStream ostream)
throws java.lang.Exception
ReceiverAdapter
getState in interface MessageListenergetState in class ReceiverAdapterostream - the OutputStream
java.lang.Exception - if the streaming fails, any exceptions should be thrown so that the state requester
can re-throw them and let the caller know what happenedOutputStream.close()
public void setState(java.io.InputStream istream)
throws java.lang.Exception
ReceiverAdapter
setState in interface MessageListenersetState in class ReceiverAdapteristream - the InputStream
java.lang.Exception - if the streaming fails, any exceptions should be thrown so that the state requester
can catch them and thus know what happenedInputStream.close()public void clearPanel()
public void sendClearPanelMsg()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void stop()
public void channelConnected(Channel channel)
ChannelListener
channelConnected in interface ChannelListenerchannel - the channel that has been connectedpublic void channelDisconnected(Channel channel)
ChannelListener
channelDisconnected in interface ChannelListenerchannel - the disconnected channelpublic void channelClosed(Channel channel)
ChannelListener
channelClosed in interface ChannelListenerchannel - the closed channel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||