public abstract class MethodFilterInterceptor extends AbstractInterceptor
Interceptor
used as
a base class for interceptors that will filter execution based on method
names according to specified included/excluded method lists.
Settable parameters are as follows:
org.apache.struts2.interceptor.TokenInterceptor
,
org.apache.struts2.interceptor.TokenSessionStoreInterceptor
,
DefaultWorkflowInterceptor
,
ValidationInterceptor
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Set<String> |
excludeMethods |
protected Set<String> |
includeMethods |
protected Logger |
log |
Constructor and Description |
---|
MethodFilterInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
applyInterceptor(ActionInvocation invocation) |
protected abstract String |
doIntercept(ActionInvocation invocation)
Subclasses must override to implement the interceptor logic.
|
Set<String> |
getExcludeMethodsSet() |
Set<String> |
getIncludeMethodsSet() |
String |
intercept(ActionInvocation invocation)
Override to handle interception
|
void |
setExcludeMethods(String excludeMethods) |
void |
setIncludeMethods(String includeMethods) |
destroy, init
protected transient Logger log
public void setExcludeMethods(String excludeMethods)
public void setIncludeMethods(String includeMethods)
public String intercept(ActionInvocation invocation) throws Exception
AbstractInterceptor
intercept
in interface Interceptor
intercept
in class AbstractInterceptor
invocation
- the action invocationActionInvocation.invoke()
, or from the interceptor itself.Exception
- any system-level error, as defined in Action.execute()
.protected boolean applyInterceptor(ActionInvocation invocation)
protected abstract String doIntercept(ActionInvocation invocation) throws Exception
invocation
- the action invocationException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.