Package org.apache.struts2.interceptor
Class AbstractInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
- All Implemented Interfaces:
- Serializable,- ConditionalInterceptor,- Interceptor
- Direct Known Subclasses:
- AbstractFileUploadInterceptor,- AliasInterceptor,- AnnotationWorkflowInterceptor,- ChainingInterceptor,- CheckboxInterceptor,- ClearSessionInterceptor,- CoepInterceptor,- CookieInterceptor,- CookieProviderInterceptor,- CoopInterceptor,- CreateSessionInterceptor,- CspInterceptor,- DateTextFieldInterceptor,- DebuggingInterceptor,- ExceptionMappingInterceptor,- FetchMetadataInterceptor,- HttpMethodInterceptor,- I18nInterceptor,- LoggingInterceptor,- MessageStoreInterceptor,- MethodFilterInterceptor,- MockInterceptor,- ModelDrivenInterceptor,- MultiselectInterceptor,- NoOpInterceptor,- ParameterRemoverInterceptor,- RolesInterceptor,- ScopedModelDrivenInterceptor,- ScopeInterceptor,- ServletConfigInterceptor,- StaticParametersInterceptor
Provides default implementations of optional lifecycle methods
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddestroy()Does nothingvoidinit()Does nothingabstract Stringintercept(ActionInvocation invocation) Override to handle interceptionvoidsetDisabled(String disable) Allows to skip executing a given interceptor, just define<param name="disabled">true</param>or use other way to override interceptor's parameters, see docs.booleanshouldIntercept(ActionInvocation invocation) Determines if a given interceptor should be executed in the current processing of action invocation.
- 
Constructor Details- 
AbstractInterceptorpublic AbstractInterceptor()
 
- 
- 
Method Details- 
initpublic void init()Does nothing- Specified by:
- initin interface- Interceptor
 
- 
destroypublic void destroy()Does nothing- Specified by:
- destroyin interface- Interceptor
 
- 
interceptOverride to handle interception- Specified by:
- interceptin interface- Interceptor
- 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().
 
- 
setDisabledAllows to skip executing a given interceptor, just define<param name="disabled">true</param>or use other way to override interceptor's parameters, see docs.- Parameters:
- disable- if set to true, execution of a given interceptor will be skipped.
 
- 
shouldInterceptDescription copied from interface:ConditionalInterceptorDetermines if a given interceptor should be executed in the current processing of action invocation.- Specified by:
- shouldInterceptin interface- ConditionalInterceptor
- Parameters:
- invocation- current- ActionInvocationto determine if the interceptor should be executed
- Returns:
- true if the given interceptor should be included in the current action invocation
 
 
-