public class Draw extends ReceiverAdapter implements java.awt.event.ActionListener, ChannelListener
| 限定符和类型 | 类和说明 |
|---|---|
protected class |
Draw.DrawPanel |
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.lang.String |
cluster_name |
protected boolean |
send_own_state_on_merge |
| 构造器和说明 |
|---|
Draw(JChannel channel) |
Draw(JChannel 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,
boolean send_own_state_on_merge,
AddressGenerator gen) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
getClusterName() |
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() |
protected void |
sendOwnState(java.util.Map<java.awt.Point,java.awt.Color> copy) |
void |
setClusterName(java.lang.String clustername) |
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.
|
block, suspect, unblockprotected java.lang.String cluster_name
protected boolean send_own_state_on_merge
public Draw(java.lang.String props,
boolean no_channel,
boolean jmx,
boolean use_state,
long state_timeout,
boolean use_unicasts,
java.lang.String name,
boolean send_own_state_on_merge,
AddressGenerator gen)
throws java.lang.Exception
java.lang.Exceptionpublic Draw(JChannel channel) throws java.lang.Exception
java.lang.Exceptionpublic Draw(JChannel channel, boolean use_state, long state_timeout) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getClusterName()
public void setClusterName(java.lang.String clustername)
public static void main(java.lang.String[] args)
public void go()
throws java.lang.Exception
java.lang.Exceptionpublic void receive(Message msg)
ReceiverAdapterreceive 在接口中 MessageListenerreceive 在类中 ReceiverAdapterpublic void viewAccepted(View v)
ReceiverAdapterChannel.connect(String) returns.viewAccepted 在接口中 MembershipListenerviewAccepted 在类中 ReceiverAdapterpublic void getState(java.io.OutputStream ostream)
throws java.lang.Exception
ReceiverAdaptergetState 在接口中 MessageListenergetState 在类中 ReceiverAdapterostream - the OutputStreamjava.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
ReceiverAdaptersetState 在接口中 MessageListenersetState 在类中 ReceiverAdapteristream - the InputStreamjava.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 在接口中 java.awt.event.ActionListenerpublic void stop()
protected void sendOwnState(java.util.Map<java.awt.Point,java.awt.Color> copy)
public void channelConnected(Channel channel)
ChannelListenerchannelConnected 在接口中 ChannelListenerchannel - the channel that has been connectedpublic void channelDisconnected(Channel channel)
ChannelListenerchannelDisconnected 在接口中 ChannelListenerchannel - the disconnected channelpublic void channelClosed(Channel channel)
ChannelListenerchannelClosed 在接口中 ChannelListenerchannel - the closed channel