Class TransactionalClientSessionInterceptor

  • All Implemented Interfaces:
    io.micronaut.aop.Interceptor<com.mongodb.client.ClientSession,​java.lang.Object>, io.micronaut.aop.MethodInterceptor<com.mongodb.client.ClientSession,​java.lang.Object>, io.micronaut.core.order.Ordered

    @Requires(classes=com.mongodb.client.ClientSession.class,
              beans=MongoSynchronousTransactionManagerImpl.class)
    @Prototype
    public final class TransactionalClientSessionInterceptor
    extends java.lang.Object
    implements io.micronaut.aop.MethodInterceptor<com.mongodb.client.ClientSession,​java.lang.Object>
    An interceptor that allows injecting a ClientSession that acts a proxy to lookup the connection for the current transaction.
    Since:
    3.3
    Author:
    Denis Stepanov
    • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object intercept​(io.micronaut.aop.MethodInvocationContext<com.mongodb.client.ClientSession,​java.lang.Object> 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
    • Method Detail

      • intercept

        public java.lang.Object intercept​(io.micronaut.aop.MethodInvocationContext<com.mongodb.client.ClientSession,​java.lang.Object> context)
        Specified by:
        intercept in interface io.micronaut.aop.MethodInterceptor<com.mongodb.client.ClientSession,​java.lang.Object>