|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.HttpService
org.glassfish.grizzly.http.server.HttpServiceChain
public class HttpServiceChain
The HttpServiceChain class allows the invocation of multiple HttpServices
every time a new HTTP request is ready to be handled. Requests are mapped
to their associated HttpService at runtime using the mapping
information configured when invoking the (org.glassfish.grizzly.http.server.HttpService, java.lang.String[])
Note: This class is NOT thread-safe, so make sure synchronization
is performed when dynamically adding and removing HttpService
| Field Summary | |
|---|---|
protected static int |
MAPPED_SERVICE
|
protected static int |
MAPPING_DATA
|
| Fields inherited from class org.glassfish.grizzly.http.server.HttpService |
|---|
staticResourcesHandler |
| Constructor Summary | |
|---|---|
HttpServiceChain(HttpServer gws)
|
|
| Method Summary | |
|---|---|
void |
addService(HttpService httpService,
String[] mappings)
Add a HttpService and its associated array of mapping. |
void |
destroy()
Invoked when the HttpServer and may be overridden by custom
implementations to perform implementation specific resource reclaimation
tasks. |
void |
jmxDisabled()
Invoked when JMX has been disabled. |
void |
jmxEnabled()
Invoked when JMX has been enabled. |
boolean |
removeHttpService(HttpService httpService)
Remove a HttpService |
void |
service(Request request,
Response response)
Map the Request to the proper HttpService |
void |
start()
Called when the HttpService's
container is started by invoking HttpServer.start(). |
| Methods inherited from class org.glassfish.grizzly.http.server.HttpService |
|---|
customizedErrorPage, doService, getDocRoot, getStaticResourcesHandler, isAllowEncodedSlash, sendAcknowledgment, setAllowEncodedSlash, setDecodeUrl, setDocRoot, setDocRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int MAPPING_DATA
protected static final int MAPPED_SERVICE
| Constructor Detail |
|---|
public HttpServiceChain(HttpServer gws)
| Method Detail |
|---|
public void jmxEnabled()
JmxEventListener
jmxEnabled in interface JmxEventListenerServerConfiguration.setJmxEnabled(boolean)public void jmxDisabled()
JmxEventListener
jmxDisabled in interface JmxEventListenerServerConfiguration.setJmxEnabled(boolean)public void start()
HttpServiceHttpService's
container is started by invoking HttpServer.start().
By default, it does nothing.
start in class HttpService
public void service(Request request,
Response response)
throws Exception
Request to the proper HttpService
service in class HttpServicerequest - The Requestresponse - The Response
Exception
public void addService(HttpService httpService,
String[] mappings)
HttpService and its associated array of mapping. The mapping
data will be used to map incoming request to its associated HttpService.
httpService - HttpService instancemappings - an array of mapping.public void destroy()
HttpServiceHttpServer and may be overridden by custom
implementations to perform implementation specific resource reclaimation
tasks.
By default, this method does nothing.
destroy in class HttpServicepublic boolean removeHttpService(HttpService httpService)
HttpService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||