Package org.apache.struts2.interceptor
Class MethodFilterInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.MethodFilterInterceptor
- All Implemented Interfaces:
- Serializable,- ConditionalInterceptor,- Interceptor
- Direct Known Subclasses:
- ConversionErrorInterceptor,- DefaultWorkflowInterceptor,- ExecuteAndWaitInterceptor,- ParametersInterceptor,- PrepareInterceptor,- TokenInterceptor,- ValidationInterceptor
 MethodFilterInterceptor is an abstract Interceptor used as
 a base class for interceptors that will filter execution based on method
 names according to specified included/excluded method lists.
 
- excludeMethods - method names to be excluded from interceptor processing
- includeMethods - method names to be included in interceptor processing
NOTE: If method name are available in both includeMethods and excludeMethods, it will be considered as an included method: includeMethods takes precedence over excludeMethods.
Interceptors that extends this capability include:- TokenInterceptor
- TokenSessionStoreInterceptor
- DefaultWorkflowInterceptor
- ValidationInterceptor
- Author:
- Alexandru Popescu, Rainer Hermanns
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescription
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanapplyInterceptor(ActionInvocation invocation) protected abstract StringdoIntercept(ActionInvocation invocation) Subclasses must override to implement the interceptor logic.intercept(ActionInvocation invocation) Override to handle interceptionvoidsetExcludeMethods(String excludeMethods) voidsetIncludeMethods(String includeMethods) Methods inherited from class org.apache.struts2.interceptor.AbstractInterceptordestroy, init, setDisabled, shouldIntercept
- 
Field Details- 
excludeMethods
- 
includeMethods
 
- 
- 
Constructor Details- 
MethodFilterInterceptorpublic MethodFilterInterceptor()
 
- 
- 
Method Details- 
setExcludeMethods
- 
getExcludeMethodsSet
- 
setIncludeMethods
- 
getIncludeMethodsSet
- 
interceptDescription copied from class:AbstractInterceptorOverride to handle interception- Specified by:
- interceptin interface- Interceptor
- Specified by:
- interceptin 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().
 
- 
applyInterceptor
- 
doInterceptSubclasses must override to implement the interceptor logic.- Parameters:
- invocation- the action invocation
- Returns:
- the result of invocation
- Throws:
- Exception- in case of any errors
 
 
-