ChannelSender (Tomcat API Documentation)
Keywords: org.apache.catalina.tribes.ChannelSender interface

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.tribes
Interface ChannelSender

All Superinterfaces:
  Heartbeat

All Known Implementing Classes:
  ReplicationTransmitter

    public interface ChannelSender

extends Heartbeat

ChannelReceiver Interface
The `ChannelSender` interface is the data sender component at the bottom layer, the IO layer (for layers see the javadoc for the `Channel` interface).
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

Version:
  $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $
Author:
  Filip Hanik

Method Summary
`void` | `add(Member member)` Notify the sender of a member being added to the group.
`void` | `heartbeat()` A channel heartbeat, use this method to clean up resources
`void` | `remove(Member member)` Notification that a member has been removed or crashed.
`void` | `sendMessage(ChannelMessage message, Member[] destination)` Send a message to one or more recipients.
`void` | `start()` Start the channel sender
`void` | `stop()` Stop the channel sender

Method Detail

### add

    void 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

### remove

    void remove(Member member)

  Notification that a member has been removed or crashed. Can be used to clean up open connections etc

  Parameters:
    `member` - Member

### start

    void start()
               throws java.io.IOException

  Start the channel sender

  Throws:
    `IOException` - if preprocessing takes place and an error happens

### stop

    void stop()

  Stop the channel sender

### heartbeat

    void heartbeat()

  A channel heartbeat, use this method to clean up resources

  Specified by:
    `heartbeat` in interface `Heartbeat`

### sendMessage

    void 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)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.