com.creamtec.ajaxswing.core

## Class AbstractAgentRequestFilter

- java.lang.Object
- - com.creamtec.ajaxswing.core.AbstractAgentRequestFilter

- All Implemented Interfaces:
    AgentRequestFilter

      public abstract class AbstractAgentRequestFilter
      extends java.lang.Object
      implements AgentRequestFilter

  Provides base implementation for AgentRequestFilter interface

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractAgentRequestFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractAgentRequestFilter

          public AbstractAgentRequestFilter()

  - ### Method Detail

    - #### preProcessRequest

          public HttpResponseData preProcessRequest(ClientAgent agent)

      Description copied from interface: `AgentRequestFilter`
      Called when a request is received and the agent is initialized. Returning a null from this method indicates that the processing should continue. Returning a non-null value indicates that the request is processed and the response can be returned to the router servlet.
      Specified by:
        `preProcessRequest` in interface `AgentRequestFilter`
      Parameters:
        `agent` - client agent
      Returns:
        null or initialized HttpResponseData

    - #### preEmulateAction

          public boolean preEmulateAction(ClientAgent agent,
                                 ActionData data)

      Description copied from interface: `AgentRequestFilter`
      Called after the controls have been updated with the data but before the action is emulated. If there is no action to be emulated (for instance, if "update" was submitted, this method will not be called.
      Specified by:
        `preEmulateAction` in interface `AgentRequestFilter`
      Parameters:
        `agent` - client agent
        `data` - contains the information about the action to be emulated
      Returns:
        true to emulate the action, false to not emulate

    - #### postEmulateAction

          public void postEmulateAction(ClientAgent agent,
                               ActionData data)

      Description copied from interface: `AgentRequestFilter`
      Called after the action emulation is complete. (even if preEmulateAction returned false).
      Specified by:
        `postEmulateAction` in interface `AgentRequestFilter`
      Parameters:
        `agent` - client agent
        `data` - contains the information about the action to be emulated

    - #### preRenderWindows

          public void preRenderWindows(ClientAgent agent,
                              java.util.List windows)

      Description copied from interface: `AgentRequestFilter`
      Called before the given window is rendered as HTML page
      Specified by:
        `preRenderWindows` in interface `AgentRequestFilter`
      Parameters:
        `agent` - client agent
        `windows` - Window to be rendered

    - #### postRenderWindows

          public java.lang.String postRenderWindows(ClientAgent agent,
                                           java.util.List windows,
                                           java.lang.String htmlCode)

      Description copied from interface: `AgentRequestFilter`
      Called after the given window is rendered as HTML page
      Specified by:
        `postRenderWindows` in interface `AgentRequestFilter`
      Parameters:
        `agent` - client agent
        `windows` - Window that was rendered
        `htmlCode` - 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
      Returns:
        HTML code of the page that will be returned to the browser. The filter has to return the HTML code whether it modified it or not

    - #### postProcessRequest

          public void postProcessRequest(ClientAgent agent,
                                HttpResponseData responseData)

      Description copied from interface: `AgentRequestFilter`
      Called when a request is processed and about to be returned to the router servlet.
      Specified by:
        `postProcessRequest` in interface `AgentRequestFilter`
      Parameters:
        `agent` - client agent
        `responseData` - containing the generated page

Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.