|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.HttpHandler
org.glassfish.grizzly.http.server.HttpHandlerChain
public class HttpHandlerChain
The HttpHandlerChain class allows the invocation of multiple HttpHandlers
every time a new HTTP request is ready to be handled. Requests are mapped
to their associated HttpHandler at runtime using the mapping
information configured when invoking the (org.glassfish.grizzly.http.server.HttpHandler, java.lang.String[])
| Constructor Summary | |
|---|---|
HttpHandlerChain(HttpServer httpServer)
|
|
| Method Summary | |
|---|---|
void |
addHandler(HttpHandler httpHandler,
String[] mappings)
Add a HttpHandler 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 |
removeAllHttpHandlers()
|
boolean |
removeHttpHandler(HttpHandler httpHandler)
Remove a HttpHandler |
protected boolean |
sendAcknowledgment(Request request,
Response response)
Skip 100-Continue processing in HttpHandlerChain. |
void |
service(Request request,
Response response)
Map the Request to the proper HttpHandler |
void |
start()
Called when the HttpHandler's
container is started by invoking HttpServer.start(). |
| Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler |
|---|
customizedErrorPage, doHandle, getName, getRequestURIEncoding, isAllowCustomStatusMessage, isAllowEncodedSlash, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setRequestURIEncoding, setRequestURIEncoding, updatePaths |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpHandlerChain(HttpServer httpServer)
| Method Detail |
|---|
public void jmxEnabled()
JmxEventListener
jmxEnabled in interface JmxEventListenerServerConfiguration.setJmxEnabled(boolean)public void jmxDisabled()
JmxEventListener
jmxDisabled in interface JmxEventListenerServerConfiguration.setJmxEnabled(boolean)
protected boolean sendAcknowledgment(Request request,
Response response)
throws IOException
sendAcknowledgment in class HttpHandlerrequest - the Request.response - the Response.
true if request processing should continue after
acknowledgment of the expectation, otherwise return false.
IOException - if an error occurs sending the acknowledgment.
public void service(Request request,
Response response)
throws Exception
Request to the proper HttpHandler
service in class HttpHandlerrequest - The Requestresponse - The Response
Exception
public void addHandler(HttpHandler httpHandler,
String[] mappings)
HttpHandler and its associated array of mapping. The mapping
data will be used to map incoming request to its associated HttpHandler.
httpHandler - HttpHandler instancemappings - an array of mapping.public boolean removeHttpHandler(HttpHandler httpHandler)
HttpHandler
public void removeAllHttpHandlers()
public void start()
HttpHandlerHttpHandler's
container is started by invoking HttpServer.start().
By default, it does nothing.
start in class HttpHandlerpublic void destroy()
HttpHandlerHttpServer and may be overridden by custom
implementations to perform implementation specific resource reclaimation
tasks.
By default, this method does nothing.
destroy in class HttpHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||