|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RouterRequestFilter
This interface must be implemented by classes in order to do pre- and post-processing of HTTP requests on the servlet level. AjaxSwing uses a router servlet (AjaxSwingRouter) to receive the requests. The actual processing of the request is delegated to the client agent. AjaxSwing uses POST method to submit the form. When a request is received, the router first calls preProcessRequest. Then, a client agent is located and the data is extraced from HTTP servlet request and placed into AjaxSwing's HttpRequestData. After that the router calls postProcessRequest and if the processing is not cancelled, calls processHttpRequest method of the client agent. When the client agent method returns, processReponse method of the request filter is called.
for sample implementation
Method Summary | |
---|---|
boolean |
postProcessRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AppDesc appDesc,
ClientAgentRemote agent,
HttpRequestData requestData)
Called when a new HTTP request is received by the router after the AjaxSwing related information has been extracted from the request and the appropriate client agent located. |
boolean |
preProcessRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called when a new HTTP request is received by the router before any processing has been done. |
boolean |
processResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AppDesc appDesc,
ClientAgentRemote agent,
HttpRequestData requestData,
HttpResponseData responseData)
Called when the client agent has finished processing the request and has returned a page. |
Method Detail |
---|
boolean preProcessRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- HttpServletRequestresponse
- HttpServletResponse
boolean postProcessRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AppDesc appDesc, ClientAgentRemote agent, HttpRequestData requestData) throws java.lang.Exception
request
- HttpServletRequestresponse
- HttpServletResponseappDesc
- Application descriptor used by AjaxSwing to maintain the application informationagent
- Client agent associated with the request. Can be in the same JVM or in a different JVM.requestData
- Request data that is going to be sent to the client agent.
java.lang.Exception
- on errorboolean processResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AppDesc appDesc, ClientAgentRemote agent, HttpRequestData requestData, HttpResponseData responseData) throws java.lang.Exception
request
- HttpServletRequestresponse
- HttpServletResponseappDesc
- AppDescagent
- ClientAgentRemoterequestData
- HttpRequestDataresponseData
- HttpResponseData
java.lang.Exception
- on error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |