Class OortMulticastConfigServlet

All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class OortMulticastConfigServlet extends OortConfigServlet

This servlet initializes and configures an instance of the Oort CometD cluster manager via autodiscovery of other Oort comets using UDP multicast.

This servlet configures and starts an instance of OortMulticastConfigurer that advertises via multicast the Oort URL to which it is associated and receives the advertisements from other Oort comets.

This servlet must be initialized after an instance the CometD servlet that creates the BayeuxServer instance used by Oort.

This servlet inherits from OortConfigServlet init parameters used to configure the Oort instance, and adds the following init parameters:

  • oort.multicast.bindAddress, to specify the bind address of the MulticastSocket that receives the advertisements; defaults to the wildcard address
  • oort.multicast.groupAddress, to specify the multicast group address to join to receive the advertisements; defaults to
  • oort.multicast.groupPort, to specify the port over which advertisements are sent and received; defaults to 5577
  • oort.multicast.groupInterfaces, a comma separated list of IP addresses that will join the multicast group; default to all interfaces that support multicast
  • oort.multicast.timeToLive, to specify the time to live of advertisement packets; defaults to 1 (1 = same subnet, 32 = same site, 255 = global)
  • oort.multicast.advertiseInterval, to specify the interval in milliseconds at which advertisements are sent; defaults to 2000 ms
  • oort.multicast.connectTimeout, to specify the timeout in milliseconds that a node should wait to connect to another node; defaults to 2000 ms
  • oort.multicast.maxTransmissionLength, to specify the maximum length in bytes of the advertisement message, and should be smaller than the max transmission unit; defaults to 1400 bytes
See Also:
  • Field Details

  • Constructor Details

    • OortMulticastConfigServlet

      public OortMulticastConfigServlet()
  • Method Details

    • configureCloud

      protected void configureCloud(javax.servlet.ServletConfig config, Oort oort) throws Exception
      Description copied from class: OortConfigServlet

      Configures the Oort cloud by establishing connections with other Oort comets.

      Subclasses implement their own strategy to discover and link with other comets.

      Specified by:
      configureCloud in class OortConfigServlet
      config - the servlet configuration to read parameters from
      oort - the Oort instance associated with this configuration servlet
      Exception - if the cloud configuration fails
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Servlet
      destroy in class OortConfigServlet