|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.HttpRequestProcessor
org.glassfish.grizzly.http.server.HttpServiceChain
public class HttpServiceChain
The HttpServiceChain class allows the invocation of multiple HttpRequestProcessors
every time a new HTTP request is ready to be handled. Requests are mapped
to their associated HttpRequestProcessor 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 HttpRequestProcessor
| Constructor Summary | |
|---|---|
HttpServiceChain(HttpServer httpServer)
|
|
| Method Summary | |
|---|---|
void |
addService(HttpRequestProcessor httpService,
String[] mappings)
Add a HttpRequestProcessor 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. |
void |
removeAllHttpServices()
|
boolean |
removeHttpService(HttpRequestProcessor httpService)
Remove a HttpRequestProcessor |
void |
service(Request request,
Response response)
Map the Request to the proper HttpRequestProcessor |
void |
start()
Called when the HttpRequestProcessor's
container is started by invoking HttpServer.start(). |
| Methods inherited from class org.glassfish.grizzly.http.server.HttpRequestProcessor |
|---|
customizedErrorPage, doService, getRequestURIEncoding, isAllowCustomStatusMessage, isAllowEncodedSlash, sendAcknowledgment, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setRequestURIEncoding, setRequestURIEncoding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpServiceChain(HttpServer httpServer)
| 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()
HttpRequestProcessorHttpRequestProcessor's
container is started by invoking HttpServer.start().
By default, it does nothing.
start in class HttpRequestProcessor
public void service(Request request,
Response response)
throws Exception
Request to the proper HttpRequestProcessor
service in class HttpRequestProcessorrequest - The Requestresponse - The Response
Exception
public void addService(HttpRequestProcessor httpService,
String[] mappings)
HttpRequestProcessor and its associated array of mapping. The mapping
data will be used to map incoming request to its associated HttpRequestProcessor.
httpService - HttpRequestProcessor instancemappings - an array of mapping.public void destroy()
HttpRequestProcessorHttpServer and may be overridden by custom
implementations to perform implementation specific resource reclaimation
tasks.
By default, this method does nothing.
destroy in class HttpRequestProcessorpublic boolean removeHttpService(HttpRequestProcessor httpService)
HttpRequestProcessor
public void removeAllHttpServices()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||