Class OortMulticastConfigServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
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 theMulticastSocket
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 bytes
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class org.cometd.oort.OortConfigServlet
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureCloud
(javax.servlet.ServletConfig config, Oort oort) Configures the Oort cloud by establishing connections with other Oort comets.void
destroy()
Methods inherited from class org.cometd.oort.OortConfigServlet
configureOort, init, newOort, provideOortURL
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
OORT_MULTICAST_BIND_ADDRESS_PARAM
- See Also:
-
OORT_MULTICAST_GROUP_ADDRESS_PARAM
- See Also:
-
OORT_MULTICAST_GROUP_PORT_PARAM
- See Also:
-
OORT_MULTICAST_GROUP_INTERFACES_PARAM
- See Also:
-
OORT_MULTICAST_TIME_TO_LIVE_PARAM
- See Also:
-
OORT_MULTICAST_ADVERTISE_INTERVAL_PARAM
- See Also:
-
OORT_MULTICAST_CONNECT_TIMEOUT_PARAM
- See Also:
-
OORT_MULTICAST_MAX_TRANSMISSION_LENGTH_PARAM
- See Also:
-
-
Constructor Details
-
OortMulticastConfigServlet
public OortMulticastConfigServlet()
-
-
Method Details
-
configureCloud
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 classOortConfigServlet
- Parameters:
config
- the servlet configuration to read parameters fromoort
- the Oort instance associated with this configuration servlet- Throws:
Exception
- if the cloud configuration fails
-
destroy
public void destroy()- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classOortConfigServlet
-