|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.ServerConfiguration
public class ServerConfiguration
Configuration options for a particular HttpServer instance.
| Method Summary | |
|---|---|
void |
addHttpService(HttpService httpService,
String... mapping)
Adds the specified HttpService
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. |
protected HttpService |
buildService()
|
String |
getDocRoot()
|
String |
getHttpServerName()
|
String |
getHttpServerVersion()
|
Iterator<JmxEventListener> |
getJmxEventListeners()
|
HttpServerMonitoringConfig |
getMonitoringConfig()
Get the web server monitoring config. |
String |
getName()
|
boolean |
isJmxEnabled()
|
boolean |
removeHttpService(HttpService httpService)
Removes the specified HttpService. |
void |
removeJmxEventListener(JmxEventListener listener)
Removes the specified JmxEventListener. |
void |
setDocRoot(String docRoot)
|
void |
setHttpServerName(String httpServerName)
Sets the server name used for HTTP response headers and default generated error pages. |
void |
setHttpServerVersion(String httpServerVersion)
Sets the version of the server info sent in HTTP response headers and the default generated error pages. |
void |
setJmxEnabled(boolean jmxEnabled)
Enables JMX for this HttpServer. |
void |
setName(String name)
Sets the logical name of this HttpServer instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public String getDocRoot()
public void setDocRoot(String docRoot)
public void addHttpService(HttpService httpService,
String... mapping)
HttpService
with its associated mapping(s). Requests will be dispatched to a
HttpService based on these mapping
values.
httpService - a HttpServicemapping - context path mapping information.public boolean removeHttpService(HttpService httpService)
HttpService.
protected HttpService buildService()
HttpService to be used by this server instance.
This may be a single HttpService or a composite of multiple
HttpService instances wrapped by a HttpServiceChain.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 Iterator<JmxEventListener> getJmxEventListeners()
Iterator of all registered JmxEventListeners.public String getHttpServerName()
public void setHttpServerName(String httpServerName)
Grizzly.
httpServerName - server namepublic String getHttpServerVersion()
public void setHttpServerVersion(String httpServerVersion)
httpServerVersion - server version
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||