Package org.apache.struts2.mock
Class MockInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
org.apache.struts2.mock.MockInterceptor
- All Implemented Interfaces:
Serializable
,ConditionalInterceptor
,Interceptor
Mock for an
Interceptor
.- Author:
- Jason Carreira
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getFoo()
int
hashCode()
intercept
(ActionInvocation invocation) 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.boolean
void
setExpectedFoo
(String expectedFoo) void
Methods inherited from class org.apache.struts2.interceptor.AbstractInterceptor
destroy, init, setDisabled, shouldIntercept
-
Field Details
-
DEFAULT_FOO_VALUE
- See Also:
-
-
Constructor Details
-
MockInterceptor
public MockInterceptor()
-
-
Method Details
-
isExecuted
public boolean isExecuted() -
setExpectedFoo
-
getExpectedFoo
-
setFoo
-
getFoo
-
equals
-
hashCode
public int hashCode() -
intercept
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 interfaceInterceptor
- Specified by:
intercept
in classAbstractInterceptor
- 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 inAction.execute()
.
-