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
addressoort.multicast.groupAddress
, to specify the multicast group address
to join to receive the advertisements; defaults to 239.255.0.1oort.multicast.groupPort
, to specify the port over which advertisements
are sent and received; defaults to 5577oort.multicast.groupInterfaces
, a comma separated list of IP addresses
that will join the multicast group; default to all interfaces that support multicastoort.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 msoort.multicast.connectTimeout
, to specify the timeout in milliseconds
that a node should wait to connect to another node; defaults to 2000 msoort.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 bytesModifier and Type | Field and Description |
---|---|
static String |
OORT_MULTICAST_ADVERTISE_INTERVAL_PARAM |
static String |
OORT_MULTICAST_BIND_ADDRESS_PARAM |
static String |
OORT_MULTICAST_CONNECT_TIMEOUT_PARAM |
static String |
OORT_MULTICAST_GROUP_ADDRESS_PARAM |
static String |
OORT_MULTICAST_GROUP_INTERFACES_PARAM |
static String |
OORT_MULTICAST_GROUP_PORT_PARAM |
static String |
OORT_MULTICAST_MAX_TRANSMISSION_LENGTH_PARAM |
static String |
OORT_MULTICAST_TIME_TO_LIVE_PARAM |
OORT_CHANNELS_PARAM, OORT_CLIENT_TRANSPORT_FACTORIES_PARAM, OORT_ENABLE_ACK_EXTENSION_PARAM, OORT_ENABLE_BINARY_EXTENSION_PARAM, OORT_JSON_CONTEXT_PARAM, OORT_SECRET_PARAM, OORT_URL_PARAM
Constructor and Description |
---|
OortMulticastConfigServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureCloud(javax.servlet.ServletConfig config,
Oort oort)
Configures the Oort cloud by establishing connections with other Oort comets.
|
void |
destroy() |
configureOort, init, newOort, provideOortURL
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
public static final String OORT_MULTICAST_BIND_ADDRESS_PARAM
public static final String OORT_MULTICAST_GROUP_ADDRESS_PARAM
public static final String OORT_MULTICAST_GROUP_PORT_PARAM
public static final String OORT_MULTICAST_GROUP_INTERFACES_PARAM
public static final String OORT_MULTICAST_TIME_TO_LIVE_PARAM
public static final String OORT_MULTICAST_ADVERTISE_INTERVAL_PARAM
public static final String OORT_MULTICAST_CONNECT_TIMEOUT_PARAM
public static final String OORT_MULTICAST_MAX_TRANSMISSION_LENGTH_PARAM
protected void configureCloud(javax.servlet.ServletConfig config, Oort oort) throws Exception
OortConfigServlet
Configures the Oort cloud by establishing connections with other Oort comets.
Subclasses implement their own strategy to discover and link with other comets.
configureCloud
in class OortConfigServlet
config
- the servlet configuration to read parameters fromoort
- the Oort instance associated with this configuration servletException
- if the cloud configuration failspublic void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class OortConfigServlet
Copyright © 2008–2024 The CometD Project. All rights reserved.