Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment:

Update parent page

...

Code Block
java
java
public class MyInterceptor implements Interceptor {
  // ...
  public String intercept(ActionInvocation invocation) throws Exception {
    
    invocation.addPreResultListener(new PreResultListener() {

      public void beforeResult(ActionInvocation invocation, String resultCode) {
        Map resultsMap = invocation.getProxy().getConfig().getResults();
        ResultConfig finalResultConfig = resultsMap.get(resultCode);

          // do something interesting with the 'to-be' executed result

        }

      });

    return invocation.invoke();
  }
  // ...
}

...