public class Draw extends ReceiverAdapter implements ActionListener, ChannelListener
Modifier and Type | Class and Description |
---|---|
protected class |
Draw.DrawPanel |
Modifier and Type | Field and Description |
---|---|
protected String |
cluster_name |
protected boolean |
send_own_state_on_merge |
Constructor and Description |
---|
Draw(JChannel channel) |
Draw(JChannel channel,
boolean use_state,
long state_timeout) |
Draw(String props,
boolean no_channel,
boolean jmx,
boolean use_state,
long state_timeout,
boolean use_unicasts,
String name,
boolean send_own_state_on_merge,
AddressGenerator gen) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
channelClosed(JChannel channel)
Channel has been closed notification callback
|
void |
channelConnected(JChannel channel)
Channel has been connected notification callback
|
void |
channelDisconnected(JChannel channel)
Channel has been disconnected notification callback
|
void |
clearPanel() |
String |
getClusterName() |
void |
getState(OutputStream ostream)
Allows an application to write a state through a provided OutputStream.
|
void |
go() |
static void |
main(String[] args) |
void |
receive(Message msg)
Called when a message is received.
|
void |
sendClearPanelMsg() |
protected void |
sendOwnState(Map<Point,Color> copy) |
void |
setClusterName(String clustername) |
void |
setState(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, receive, suspect, unblock
protected String cluster_name
protected boolean send_own_state_on_merge
public Draw(String props, boolean no_channel, boolean jmx, boolean use_state, long state_timeout, boolean use_unicasts, String name, boolean send_own_state_on_merge, AddressGenerator gen) throws Exception
Exception
public String getClusterName()
public void setClusterName(String clustername)
public static void main(String[] args)
public void receive(Message msg)
MessageListener
receive
in interface MessageListener
receive
in class ReceiverAdapter
public void viewAccepted(View v)
MembershipListener
JChannel.connect(String)
returns.viewAccepted
in interface MembershipListener
viewAccepted
in class ReceiverAdapter
public void getState(OutputStream ostream) throws Exception
StateListener
getState
in interface StateListener
getState
in class ReceiverAdapter
ostream
- the OutputStreamException
- 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(InputStream istream) throws Exception
StateListener
setState
in interface StateListener
setState
in class ReceiverAdapter
istream
- the InputStreamException
- 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(ActionEvent e)
actionPerformed
in interface ActionListener
public void stop()
public void channelConnected(JChannel channel)
ChannelListener
channelConnected
in interface ChannelListener
channel
- the channel that has been connectedpublic void channelDisconnected(JChannel channel)
ChannelListener
channelDisconnected
in interface ChannelListener
channel
- the disconnected channelpublic void channelClosed(JChannel channel)
ChannelListener
channelClosed
in interface ChannelListener
channel
- the closed channelCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.