|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AgentRequestFilter
Used to do pre- and post-processing of requests received by the client agent. The requests are usually a resut of received HTTP requests, but because the client agent may execute in a different JVM the servlet API is not accessible (see RouterRequestFilter interface for HTTP request filtering). The sequence of method execution is always the same, although depending on the request some methods may not be called. The first callback method is preProcessRequest. It is called after a request is received by the client agent and the agent is initialized. Then the GUI elements are updated with the data and if there is an action to be emulated such as a button click, preEmulateAction is called. After that the action is emulated and postEmulateAction is called. If there were no errors during the processing, preRenderWindow is called, the current window is rendered and postRenderWindow is called. Finally, postProcessRequest is called and the data is returned to the router servlet.
for sample implementation
Method Summary | |
---|---|
void |
postEmulateAction(ClientAgent agent,
ActionData data)
Called after the action emulation is complete. |
void |
postProcessRequest(ClientAgent agent,
HttpResponseData responseData)
Called when a request is processed and about to be returned to the router servlet. |
java.lang.String |
postRenderWindows(ClientAgent agent,
java.util.List windows,
java.lang.String htmlCode)
Called after the given window is rendered as HTML page |
boolean |
preEmulateAction(ClientAgent agent,
ActionData data)
Called after the controls have been updated with the data but before the action is emulated. |
HttpResponseData |
preProcessRequest(ClientAgent agent)
Called when a request is received and the agent is initialized. |
void |
preRenderWindows(ClientAgent agent,
java.util.List windows)
Called before the given window is rendered as HTML page |
Method Detail |
---|
HttpResponseData preProcessRequest(ClientAgent agent)
agent
- client agent
void postProcessRequest(ClientAgent agent, HttpResponseData responseData)
agent
- client agentresponseData
- containing the generated pageboolean preEmulateAction(ClientAgent agent, ActionData data)
agent
- client agentdata
- contains the information about the action to be emulated
void postEmulateAction(ClientAgent agent, ActionData data)
agent
- client agentdata
- contains the information about the action to be emulatedvoid preRenderWindows(ClientAgent agent, java.util.List windows)
agent
- client agentwindows
- Window to be renderedjava.lang.String postRenderWindows(ClientAgent agent, java.util.List windows, java.lang.String htmlCode)
agent
- client agentwindows
- Window that was renderedhtmlCode
- The HTML code for the page produced by AjaxSwing engine. Modifications
to the HTMLPage object associated with the client agent will not be reflected in the
generated HTML code
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |