|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RequestHandler
A generic handler of HttpServletRequests. very similar to an HttpServlet, but the handleRequest() method returns a boolean indicating if the RequestHandler returned data to the user. This interface further defines methods to facilitate automatic registration when loaded as a Spring configuration, and maintains a reference to the ServletContext under which it accepts incoming requests.
| Method Summary | |
|---|---|
String |
getBeanName()
|
javax.servlet.ServletContext |
getServletContext()
|
boolean |
handleRequest(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Possibly handle an incoming HttpServletRequest, much like a normal HttpServlet, but includes a return value. |
void |
registerPortListener(RequestMapper requestMapper)
Called at webapp context initialization, to allow the RequestHandler to register itself with the RequestMapper, which will delegate request handling to the appropriate RequestHandler. |
void |
setServletContext(javax.servlet.ServletContext servletContext)
Called before registerPortListener(), to enable the registration process and subsequent handleRequest() calls to access the ServletContext, via the getServletContext() method. |
String |
translateRequestPath(javax.servlet.http.HttpServletRequest httpRequest)
|
String |
translateRequestPathQuery(javax.servlet.http.HttpServletRequest httpRequest)
|
| Methods inherited from interface org.springframework.beans.factory.BeanNameAware |
|---|
setBeanName |
| Method Detail |
|---|
boolean handleRequest(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
throws javax.servlet.ServletException,
IOException
httpRequest - the incoming HttpServletRequesthttpResponse - the HttpServletResponse to return data to the client.
javax.servlet.ServletException - for usual reasons.
IOException - for usual reasons.String getBeanName()
void setServletContext(javax.servlet.ServletContext servletContext)
servletContext - the ServletContext where the RequestHandler is
registered.javax.servlet.ServletContext getServletContext()
void registerPortListener(RequestMapper requestMapper)
requestMapper - the RequestMapper on which this RequestHandler
should register itself, including to register for notification of context
shutdown.String translateRequestPath(javax.servlet.http.HttpServletRequest httpRequest)
httpRequest - the HttpServletRequest being handled
String translateRequestPathQuery(javax.servlet.http.HttpServletRequest httpRequest)
httpRequest - the HttpServletRequest being handled
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||