MultiCastSender (Apache Tomcat 9.0.120 API Documentation)
Description: declaration: package: org.apache.catalina.ha.backend, class: MultiCastSender

# Class MultiCastSender

java.lang.Object
org.apache.catalina.ha.backend.MultiCastSender

All Implemented Interfaces:
  `Sender`

public class MultiCastSender extends Object implements Sender
Sender to proxies using multicast socket.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MultiCastSender()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `init(HeartbeatListener config)`
  Set the configuration parameters
  `int`
  `send(String mess)`
  Send the message to the proxies

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### MultiCastSender

    public MultiCastSender()
    Default constructor.

- ## Method Details

  - ### init

    public void init(HeartbeatListener config) throws Exception
    Description copied from interface: `Sender`
    Set the configuration parameters
    Specified by:
      `init` in interface `Sender`
    Parameters:
      `config` - The heartbeat listener configuration
    Throws:
      `Exception` - An error occurred

  - ### send

    public int send(String mess) throws Exception
    Description copied from interface: `Sender`
    Send the message to the proxies
    Specified by:
      `send` in interface `Sender`
    Parameters:
      `mess` - The message that will be sent
    Returns:
      `0` if no error occurred, `-1` otherwise
    Throws:
      `Exception` - An error occurred