Class IdempotentAnnotatedMethodHandlerInterceptor
java.lang.Object
io.microsphere.spring.webmvc.interceptor.MethodHandlerInterceptor
io.microsphere.spring.webmvc.interceptor.AnnotatedMethodHandlerInterceptor<Idempotent>
io.microsphere.spring.webmvc.idempotent.IdempotentAnnotatedMethodHandlerInterceptor
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.DisposableBean,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>,org.springframework.context.EnvironmentAware,org.springframework.web.servlet.HandlerInterceptor
public class IdempotentAnnotatedMethodHandlerInterceptor
extends AnnotatedMethodHandlerInterceptor<Idempotent>
implements org.springframework.context.EnvironmentAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.beans.factory.DisposableBean
AnnotatedMethodHandlerInterceptor for Idempotent annotation- Since:
- 1.0.0
- Author:
- Mercy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()protected IdempotentgetAnnotation(org.springframework.web.method.HandlerMethod handlerMethod) protected voidinitIdempotentService(org.springframework.context.ApplicationContext context) voidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) protected booleanpreHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.web.method.HandlerMethod handlerMethod, Idempotent idempotent) voidsetEnvironment(org.springframework.core.env.Environment environment) Methods inherited from class io.microsphere.spring.webmvc.interceptor.AnnotatedMethodHandlerInterceptor
afterCompletion, afterCompletion, getAnnotationType, getMethodAnnotation, postHandle, postHandle, preHandleMethods inherited from class io.microsphere.spring.webmvc.interceptor.MethodHandlerInterceptor
afterCompletion, postHandle, preHandle, supportsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
IdempotentAnnotatedMethodHandlerInterceptor
public IdempotentAnnotatedMethodHandlerInterceptor()
-
-
Method Details
-
preHandle
protected boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.web.method.HandlerMethod handlerMethod, Idempotent idempotent) throws Exception - Overrides:
preHandlein classAnnotatedMethodHandlerInterceptor<Idempotent>- Throws:
Exception
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
getAnnotation
- Overrides:
getAnnotationin classAnnotatedMethodHandlerInterceptor<Idempotent>
-
initIdempotentService
protected void initIdempotentService(org.springframework.context.ApplicationContext context)
-