public class Draw extends ExtendedReceiverAdapter implements ActionListener, ChannelListener
Constructor and Description |
---|
Draw(Channel channel) |
Draw(Channel channel,
boolean use_state,
long state_timeout) |
Draw(String props,
boolean no_channel,
boolean jmx,
boolean use_state,
long state_timeout,
boolean use_blocking,
boolean use_unicasts,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
block()
Called (usually by the FLUSH protocol), as an indication that the member should stop sending messages.
|
void |
channelClosed(Channel channel) |
void |
channelConnected(Channel channel) |
void |
channelDisconnected(Channel channel) |
void |
channelReconnected(Address addr) |
void |
channelShunned() |
void |
clearPanel() |
String |
getGroupName() |
byte[] |
getState()
Answers the group state; e.g., when joining.
|
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() |
void |
setGroupName(String groupname) |
void |
setState(byte[] state)
Sets the group state; e.g., when joining.
|
void |
setState(InputStream istream)
Allows an application to read a state through a provided InputStream.
|
void |
stop() |
void |
unblock()
Called after the FLUSH protocol has unblocked previously blocked senders, and
messages can be sent again.
|
void |
viewAccepted(View v)
Called when a change in membership has occurred.
|
public Draw(String props, boolean no_channel, boolean jmx, boolean use_state, long state_timeout, boolean use_blocking, boolean use_unicasts, String name) throws Exception
Exception
public String getGroupName()
public void setGroupName(String groupname)
public static void main(String[] args)
public void receive(Message msg)
MessageListener
receive
in interface MessageListener
receive
in class ExtendedReceiverAdapter
public void viewAccepted(View v)
MembershipListener
Channel.connect(String)
returns.viewAccepted
in interface MembershipListener
viewAccepted
in class ExtendedReceiverAdapter
public void block()
MembershipListener
ExtendedMembershipListener.unblock()
.
Note that block() is the equivalent of reception of a BlockEvent in the pull mode.block
in interface MembershipListener
block
in class ExtendedReceiverAdapter
public void unblock()
ExtendedMembershipListener
Note that during new view installation we provide guarantee that unblock invocation strictly follows view installation at some node A belonging to that view . However, some other message M may squeeze in between view and unblock callbacks. For more details see https://jira.jboss.org/jira/browse/JGRP-986
unblock
in interface ExtendedMembershipListener
unblock
in class ExtendedReceiverAdapter
public byte[] getState()
MessageListener
getState
in interface MessageListener
getState
in class ExtendedReceiverAdapter
public void setState(byte[] state)
MessageListener
setState
in interface MessageListener
setState
in class ExtendedReceiverAdapter
public void getState(OutputStream ostream)
ExtendedMessageListener
getState
in interface ExtendedMessageListener
getState
in class ExtendedReceiverAdapter
ostream
- the OutputStreamOutputStream.close()
public void setState(InputStream istream)
ExtendedMessageListener
setState
in interface ExtendedMessageListener
setState
in class ExtendedReceiverAdapter
istream
- the InputStreamInputStream.close()
public void clearPanel()
public void sendClearPanelMsg()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void stop()
public void channelConnected(Channel channel)
channelConnected
in interface ChannelListener
public void channelDisconnected(Channel channel)
channelDisconnected
in interface ChannelListener
public void channelClosed(Channel channel)
channelClosed
in interface ChannelListener
public void channelShunned()
channelShunned
in interface ChannelListener
public void channelReconnected(Address addr)
channelReconnected
in interface ChannelListener
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.