org.apache.catalina.tribes.transport

## Class ReplicationTransmitter

- java.lang.Object
- - org.apache.catalina.tribes.transport.ReplicationTransmitter

- All Implemented Interfaces:
    ChannelSender, Heartbeat

      public class ReplicationTransmitter
      extends Object
      implements ChannelSender

  Transmit message to other cluster members Actual senders are created based on the replicationMode type

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReplicationTransmitter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Member member)` add new cluster member and create sender ( s. replicationMode) transfer current properties to sender
    `Channel` | `getChannel()` Return the channel that is related to this ChannelSender
    `MultiPointSender` | `getTransport()`
    `void` | `heartbeat()` Call transmitter to check for sender socket status
    `void` | `remove(Member member)` remove sender from transmitter. ( deregister mbean and disconnect sender )
    `void` | `sendMessage(ChannelMessage message, Member[] destination)` Send data to one member
    `void` | `setChannel(Channel channel)` Set the channel that is related to this ChannelSender
    `void` | `setTransport(MultiPointSender transport)`
    `void` | `start()` start the sender and register transmitter mbean
    `void` | `stop()` stop the sender and deregister mbeans (transmitter, senders)

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReplicationTransmitter

          public ReplicationTransmitter()

  - ### Method Detail

    - #### getTransport

          public MultiPointSender getTransport()

    - #### setTransport

          public void setTransport(MultiPointSender transport)

    - #### sendMessage

          public void sendMessage(ChannelMessage message,
                         Member[] destination)
                           throws ChannelException

      Send data to one member
      Specified by:
        `sendMessage` in interface `ChannelSender`
      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:
        `ChannelSender.sendMessage(org.apache.catalina.tribes.ChannelMessage, org.apache.catalina.tribes.Member[])`

    - #### start

          public void start()
                     throws IOException

      start the sender and register transmitter mbean
      Specified by:
        `start` in interface `ChannelSender`
      Throws:
        `IOException` - if preprocessing takes place and an error happens
      See Also:
        `ChannelSender.start()`

    - #### stop

          public void stop()

      stop the sender and deregister mbeans (transmitter, senders)
      Specified by:
        `stop` in interface `ChannelSender`
      See Also:
        `ChannelSender.stop()`

    - #### heartbeat

          public void heartbeat()

      Call transmitter to check for sender socket status
      Specified by:
        `heartbeat` in interface `ChannelSender`
      Specified by:
        `heartbeat` in interface `Heartbeat`
      See Also:
        `SimpleTcpCluster.backgroundProcess()`

    - #### add

          public void add(Member member)

      add new cluster member and create sender ( s. replicationMode) transfer current properties to sender
      Specified by:
        `add` in interface `ChannelSender`
      Parameters:
        `member` - Member
      See Also:
        `ChannelSender.add(org.apache.catalina.tribes.Member)`

    - #### remove

          public void remove(Member member)

      remove sender from transmitter. ( deregister mbean and disconnect sender )
      Specified by:
        `remove` in interface `ChannelSender`
      Parameters:
        `member` - Member
      See Also:
        `ChannelSender.remove(org.apache.catalina.tribes.Member)`

    - #### getChannel

          public Channel getChannel()

      Description copied from interface: `ChannelSender`
      Return the channel that is related to this ChannelSender
      Specified by:
        `getChannel` in interface `ChannelSender`
      Returns:
        Channel

    - #### setChannel

          public void setChannel(Channel channel)

      Description copied from interface: `ChannelSender`
      Set the channel that is related to this ChannelSender
      Specified by:
        `setChannel` in interface `ChannelSender`
      Parameters:
        `channel` - The channel

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