Class RefreshInterceptor

java.lang.Object
io.micronaut.runtime.context.scope.refresh.RefreshInterceptor
All Implemented Interfaces:
io.micronaut.aop.Interceptor, io.micronaut.aop.MethodInterceptor, io.micronaut.core.order.Ordered

@Singleton @Requires(notEnv={"function","android"}) public class RefreshInterceptor extends Object implements io.micronaut.aop.MethodInterceptor

A MethodInterceptor that will lock the bean preventing it from being destroyed by a RefreshEvent until the method completes.

Since:
1.0
  • Field Summary

    Fields inherited from interface io.micronaut.aop.Interceptor

    ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Object
    intercept(io.micronaut.aop.MethodInvocationContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.aop.MethodInterceptor

    intercept

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Constructor Details

    • RefreshInterceptor

      public RefreshInterceptor(RefreshScope refreshScope)
      Parameters:
      refreshScope - To allow target beans to be refreshed
  • Method Details

    • intercept

      @Nullable public @Nullable Object intercept(io.micronaut.aop.MethodInvocationContext context)
      Specified by:
      intercept in interface io.micronaut.aop.MethodInterceptor