org.apache.catalina.tribes.group
public class ChannelCoordinator extends ChannelInterceptorBase implements MessageListener
Version: $Revision: 532943 $, $Date: 2007-04-27 05:14:58 +0200 (Fri, 27 Apr 2007) $
| Field Summary | |
|---|---|
| protected int | optionFlag |
| Constructor Summary | |
|---|---|
| ChannelCoordinator() | |
| ChannelCoordinator(ChannelReceiver receiver, ChannelSender sender, MembershipService service) | |
| Method Summary | |
|---|---|
| ChannelReceiver | getClusterReceiver() |
| ChannelSender | getClusterSender() |
| Member | getLocalMember(boolean incAlive)
Return the member that represents this node.
|
| Member | getMember(Member mbr) |
| Member[] | getMembers()
Get all current cluster members |
| MembershipService | getMembershipService() |
| int | getOptionFlag() |
| boolean | hasMembers()
has members |
| void | heartbeat() |
| protected void | internalStart(int svc)
Starts up the channel. |
| protected void | internalStop(int svc)
Shuts down the channel. |
| void | memberAdded(Member member) |
| void | memberDisappeared(Member member) |
| void | messageReceived(ChannelMessage msg) |
| void | sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload)
Send a message to one or more members in the cluster |
| void | setClusterReceiver(ChannelReceiver clusterReceiver) |
| void | setClusterSender(ChannelSender clusterSender) |
| void | setMembershipService(MembershipService membershipService) |
| void | setOptionFlag(int flag) |
| void | start(int svc)
Starts up the channel. |
| void | stop(int svc)
Shuts down the channel. |
Returns: Member
Parameters: mbr Member
Returns: Member
Returns: all members or empty array
Parameters: svc int value of
DEFAULT - will start all services
MBR_RX_SEQ - starts the membership receiver
MBR_TX_SEQ - starts the membership broadcaster
SND_TX_SEQ - starts the replication transmitter
SND_RX_SEQ - starts the replication receiver
Throws: ChannelException if a startup error occurs or the service is already started.
Parameters: svc int value of
DEFAULT - will shutdown all services
MBR_RX_SEQ - starts the membership receiver
MBR_TX_SEQ - starts the membership broadcaster
SND_TX_SEQ - starts the replication transmitter
SND_RX_SEQ - starts the replication receiver
Throws: ChannelException if a startup error occurs or the service is already started.
Parameters: destination Member[] - the destinations, null or zero length means all msg ClusterMessage - the message to send options int - sender options, see class documentation
Returns: ClusterMessage[] - the replies from the members, if any.
Parameters: svc int value of
DEFAULT - will start all services
MBR_RX_SEQ - starts the membership receiver
MBR_TX_SEQ - starts the membership broadcaster
SND_TX_SEQ - starts the replication transmitter
SND_RX_SEQ - starts the replication receiver
Throws: ChannelException if a startup error occurs or the service is already started.
Parameters: svc int value of
DEFAULT - will shutdown all services
MBR_RX_SEQ - stops the membership receiver
MBR_TX_SEQ - stops the membership broadcaster
SND_TX_SEQ - stops the replication transmitter
SND_RX_SEQ - stops the replication receiver
Throws: ChannelException if a startup error occurs or the service is already started.