public class ServerConfiguration extends ServerFilterConfiguration
HttpServer instance.MAX_REQUEST_PARAMETERS, USE_SEND_FILE| Modifier and Type | Method and Description |
|---|---|
void |
addHttpHandler(HttpHandler httpHandler)
Adds the specified
HttpHandler as a root handler. |
void |
addHttpHandler(HttpHandler httpHandler,
HttpHandlerRegistration... mapping)
Adds the specified
HttpHandler
with its associated mapping(s). |
void |
addHttpHandler(HttpHandler httpHandler,
String... mappings)
Adds the specified
HttpHandler
with its associated mapping(s). |
void |
addJmxEventListener(JmxEventListener listener)
Add a
JmxEventListener which will be notified when the
HttpServer is started and JMX was enabled prior to starting
or if the HttpServer was started with JMX disabled, but
JMX was enabled at a later point in time. |
Map<HttpHandler,String[]> |
getHttpHandlers()
Deprecated.
please use
#getHttpHandlersMap() |
Map<HttpHandler,HttpHandlerRegistration[]> |
getHttpHandlersWithMapping()
Returns the
HttpHandler map. |
Set<JmxEventListener> |
getJmxEventListeners() |
long |
getMaxPayloadRemainderToSkip() |
HttpServerMonitoringConfig |
getMonitoringConfig()
Get the web server monitoring config.
|
String |
getName() |
boolean |
isAllowPayloadForUndefinedHttpMethods()
The flag, which enables/disables payload support for HTTP methods,
for which HTTP spec doesn't clearly state whether they support payload.
|
boolean |
isJmxEnabled() |
boolean |
removeHttpHandler(HttpHandler httpHandler)
Removes the specified
HttpHandler. |
void |
removeJmxEventListener(JmxEventListener listener)
Removes the specified
JmxEventListener. |
void |
setAllowPayloadForUndefinedHttpMethods(boolean allowPayloadForUndefinedHttpMethods)
The flag, which enables/disables payload support for HTTP methods,
for which HTTP spec doesn't clearly state whether they support payload.
|
void |
setJmxEnabled(boolean jmxEnabled)
Enables
JMX for this HttpServer. |
void |
setMaxPayloadRemainderToSkip(long maxPayloadRemainderToSkip)
Set the maximum request payload remainder (in bytes) HttpServerFilter
will try to swallow after HTTP request processing is over in order to
keep the connection alive.
|
void |
setName(String name)
Sets the logical name of this
HttpServer instance. |
getBackendConfiguration, getDefaultErrorPageGenerator, getDefaultQueryEncoding, getHttpServerName, getHttpServerVersion, getMaxBufferedPostSize, getMaxFormPostSize, getMaxPostSize, getMaxRequestParameters, getScheme, getSessionTimeoutSeconds, isGracefulShutdownSupported, isPassTraceRequest, isReuseSessionID, isSendFileEnabled, isTraceEnabled, setBackendConfiguration, setDefaultErrorPageGenerator, setDefaultQueryEncoding, setGracefulShutdownSupported, setHttpServerName, setHttpServerVersion, setMaxBufferedPostSize, setMaxFormPostSize, setMaxPostSize, setMaxRequestParameters, setPassTraceRequest, setReuseSessionID, setScheme, setSendFileEnabled, setSessionTimeoutSeconds, setTraceEnabledpublic void addHttpHandler(HttpHandler httpHandler)
HttpHandler as a root handler.httpHandler - a HttpHandlerpublic void addHttpHandler(HttpHandler httpHandler, String... mappings)
HttpHandler
with its associated mapping(s). Requests will be dispatched to a
HttpHandler based on these mapping
values.httpHandler - a HttpHandlermappings - context path mapping information.public void addHttpHandler(HttpHandler httpHandler, HttpHandlerRegistration... mapping)
HttpHandler
with its associated mapping(s). Requests will be dispatched to a
HttpHandler based on these mapping
values.httpHandler - a HttpHandlermapping - context path mapping information.public boolean removeHttpHandler(HttpHandler httpHandler)
HttpHandler.public Map<HttpHandler,String[]> getHttpHandlers()
#getHttpHandlersMap()HttpHandler map.
Please note, the returned map is read-only.HttpHandler map.public Map<HttpHandler,HttpHandlerRegistration[]> getHttpHandlersWithMapping()
HttpHandler map.
Please note, the returned map is read-only.HttpHandler map.public HttpServerMonitoringConfig getMonitoringConfig()
public String getName()
HttpServer instance.
If no name is explicitly specified, the default value will
be HttpServer. If there is more than once
HttpServer per virtual machine, the server name will
be HttpServer-[(instance count - 1)].public void setName(String name)
HttpServer instance.
The logical name cannot be changed after the server has been started.name - server namepublic boolean isJmxEnabled()
true if JMX has been enabled for this
HttpServer. If true the HttpServer
management object will be registered at the root of the JMX tree
with the name of [instance-name] where instance name is
the value returned by getName().public void setJmxEnabled(boolean jmxEnabled)
JMX for this HttpServer. This value
can be changed at runtime.jmxEnabled - true to enable JMX otherwise
falsepublic void addJmxEventListener(JmxEventListener listener)
JmxEventListener which will be notified when the
HttpServer is started and JMX was enabled prior to starting
or if the HttpServer was started with JMX disabled, but
JMX was enabled at a later point in time.listener - the JmxEventListener to add.public void removeJmxEventListener(JmxEventListener listener)
JmxEventListener.listener - the JmxEventListener to remove.public Set<JmxEventListener> getJmxEventListeners()
Iterator of all registered JmxEventListeners.public boolean isAllowPayloadForUndefinedHttpMethods()
public void setAllowPayloadForUndefinedHttpMethods(boolean allowPayloadForUndefinedHttpMethods)
allowPayloadForUndefinedHttpMethods - true if "undefined" methods support payload, or false otherwisepublic long getMaxPayloadRemainderToSkip()
public void setMaxPayloadRemainderToSkip(long maxPayloadRemainderToSkip)
maxPayloadRemainderToSkip - Copyright © 2015 Oracle Corporation. All Rights Reserved.