Class RefreshInterceptor
java.lang.Object
io.micronaut.runtime.context.scope.refresh.RefreshInterceptor
- All Implemented Interfaces:
Interceptor,MethodInterceptor,Ordered
@Singleton
@Requires(notEnv={"function","android"})
public class RefreshInterceptor
extends Object
implements MethodInterceptor
A MethodInterceptor that will lock the bean preventing it from being destroyed by a
RefreshEvent until the method completes.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface io.micronaut.aop.Interceptor
ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGETFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintercept(MethodInvocationContext context) Extended version of theMethodInterceptor.intercept(InvocationContext)method that accepts aMethodInvocationContext.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.aop.MethodInterceptor
intercept
-
Constructor Details
-
RefreshInterceptor
- Parameters:
refreshScope- To allow target beans to be refreshed
-
-
Method Details
-
intercept
Description copied from interface:MethodInterceptorExtended version of theMethodInterceptor.intercept(InvocationContext)method that accepts aMethodInvocationContext.- Specified by:
interceptin interfaceMethodInterceptor- Parameters:
context- The context- Returns:
- The result
-