HTTP Server Configuration

Table 4.2. ServerConfiguration Properties

nameSet the name of this HttpServer instance. If no name is defined, one will be assigned.
jmxEnabledDetermines whether or not JMX monitoring will be enabled for this HttpServer instance. This property can be changed at runtime.
versionSet the version of this server instance. If not explicitly set, the version will be 2.2.10.

In addition to the properties described above, the ServerConfiguration allows the addition (addHttpHandler()), removal (removeHttpHandler(), and listing of (getHttpHandlers()) HttpHandlers.

Table 4.3. NetworkListener Properties

nameThe logical name of this listener (settable only by constructor).
hostThe network host to which this listener will bind. If not user specified, it will bind to 0.0.0.0 (settable only by constructor).
portThe network port to which this listener will bind. If not user specified, it will bind to port 8080 (settable only by constructor).
keepAliveReturns the keep-alive configuration for this listener. This allows configuration for connection idle timeout (default of 30 seconds) and max keep-alive (default of 256) requests configuration.
transportThis property will typically be used for fine tuning the transport configuration, however, custom transports can also be provided.
addonsThe set of addons, which suppose to extend basic HttpServer functionality.
chunkingEnabledEnable/disable the chunk transfer-encoding (defaults to enabled).
secureEnable/disable SSL/TLS support (defaults to disabled)
sslEngineConfigIf SSL/TLS is enabled, an SSLEngineConfigurator will need to be specified by the developer. This controls how the SSLEngine will be created.
maxHttpHeaderSizeSpecifies, in bytes, the maximum size an http message header may be before being rejected. This configuration is only applicable to incoming requests.
filterChainAllows customization of the FilterChain used by this listener instance.
fileCacheAllows customization of the FileCache configuration used by this listener instance.
contentEncodingsThe content encodings (gzip as an example) that may be applied for HTTP transactions on this listener. Custom encodings may be provided.
maxPendingBytesSpecifies the maximum number of bytes that may be pending to be written to a particular connection. If bytes aren't being consumed and this value is exceeded, the connection will be closed.