Class MockInterceptor

All Implemented Interfaces:
Serializable, ConditionalInterceptor, Interceptor

public class MockInterceptor extends AbstractInterceptor
Mock for an Interceptor.
Author:
Jason Carreira
See Also:
  • Field Details

  • Constructor Details

    • MockInterceptor

      public MockInterceptor()
  • Method Details

    • isExecuted

      public boolean isExecuted()
    • setExpectedFoo

      public void setExpectedFoo(String expectedFoo)
    • getExpectedFoo

      public String getExpectedFoo()
    • setFoo

      public void setFoo(String foo)
    • getFoo

      public String getFoo()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • intercept

      public String intercept(ActionInvocation invocation) throws Exception
      Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the request by the DefaultActionInvocation or to short-circuit the processing and just return a String return code.
      Specified by:
      intercept in interface Interceptor
      Specified by:
      intercept in class AbstractInterceptor
      Parameters:
      invocation - the action invocation
      Returns:
      the return code, either returned from ActionInvocation.invoke(), or from the interceptor itself.
      Throws:
      Exception - any system-level error, as defined in Action.execute().