Package org.apache.catalina.tribes
Interface ChannelSender
- 
- All Superinterfaces:
- Heartbeat
 - All Known Implementing Classes:
- ReplicationTransmitter
 
 public interface ChannelSender extends Heartbeat ChannelReceiver Interface
 TheChannelSenderinterface is the data sender component at the bottom layer, the IO layer (for layers see the javadoc for theChannelinterface).
 The channel sender must support "silent" members, ie, be able to send a message to a member that is not in the membership, but is part of the destination parameter
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(Member member)Notify the sender of a member being added to the group.
 Optional.ChannelgetChannel()Return the channel that is related to this ChannelSendervoidheartbeat()A channel heartbeat, use this method to clean up resourcesvoidremove(Member member)Notification that a member has been removed or crashed.voidsendMessage(ChannelMessage message, Member[] destination)Send a message to one or more recipients.voidsetChannel(Channel channel)Set the channel that is related to this ChannelSendervoidstart()Start the channel sendervoidstop()Stop the channel sender
 
- 
- 
- 
Method Detail- 
addvoid add(Member member) Notify the sender of a member being added to the group.
 Optional. This can be an empty implementation, that does nothing- Parameters:
- member- Member
 
 - 
removevoid remove(Member member) Notification that a member has been removed or crashed. Can be used to clean up open connections etc- Parameters:
- member- Member
 
 - 
startvoid start() throws java.io.IOExceptionStart the channel sender- Throws:
- java.io.IOException- if preprocessing takes place and an error happens
 
 - 
stopvoid stop() Stop the channel sender
 - 
heartbeatvoid heartbeat() A channel heartbeat, use this method to clean up resources
 - 
sendMessagevoid sendMessage(ChannelMessage message, Member[] destination) throws ChannelException Send a message to one or more recipients.- Parameters:
- message- ChannelMessage - the message to be sent
- destination- Member[] - the destinations
- Throws:
- ChannelException- - if an error happens, the ChannelSender MUST report individual send failures on a per member basis, using ChannelException.addFaultyMember
- See Also:
- ChannelException.addFaultyMember(Member,java.lang.Exception)
 
 - 
getChannelChannel getChannel() Return the channel that is related to this ChannelSender- Returns:
- Channel
 
 - 
setChannelvoid setChannel(Channel channel) Set the channel that is related to this ChannelSender- Parameters:
- channel- The channel
 
 
- 
 
-