Class AbstractConvertCompletionStageInterceptor<T>

Type Parameters:
T - the value type
All Implemented Interfaces:
DataInterceptor<Object,CompletionStage<T>>
Direct Known Subclasses:
DefaultFindAllAsyncInterceptor, DefaultFindByIdAsyncInterceptor, DefaultFindOneAsyncInterceptor, DefaultFindPageAsyncInterceptor, DefaultFindSliceAsyncInterceptor

@Internal public abstract class AbstractConvertCompletionStageInterceptor<T> extends AbstractAsyncInterceptor<Object,T>
Abstract asynchronous interceptor implementation with a result conversion.
Since:
3.5.0
Author:
Denis Stepanov
  • Constructor Details

    • AbstractConvertCompletionStageInterceptor

      protected AbstractConvertCompletionStageInterceptor(RepositoryOperations datastore)
      Default constructor.
      Parameters:
      datastore - The operations
  • Method Details

    • interceptCompletionStage

      protected abstract CompletionStage<?> interceptCompletionStage(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<Object,CompletionStage<T>> context)
      Intercept CompletionStage.
      Parameters:
      methodKey - The method key
      context - The context
      Returns:
      the result publisher
    • intercept

      public CompletionStage<T> intercept(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<Object,CompletionStage<T>> context)
      Description copied from interface: DataInterceptor
      Intercepts a data method execution.
      Parameters:
      methodKey - The method key
      context - The context
      Returns:
      The result