Class AbstractAsyncInterceptor<T,R>

java.lang.Object
io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,CompletionStage<R>>
io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor<T,R>
Type Parameters:
T - The declaring type
R - The result type.
All Implemented Interfaces:
DataInterceptor<T,CompletionStage<R>>
Direct Known Subclasses:
AbstractConvertCompletionStageInterceptor, AbstractCountConvertCompletionStageInterceptor, DefaultCountAsyncInterceptor, DefaultExistsByAsyncInterceptor

public abstract class AbstractAsyncInterceptor<T,R> extends AbstractQueryInterceptor<T,CompletionStage<R>>
Abstract asynchronous interceptor implementation.
Since:
1.0.0
Author:
graemerocher
  • Field Details

    • LIST_OF_OBJECTS

      protected static final io.micronaut.core.type.Argument<List<Object>> LIST_OF_OBJECTS
    • asyncDatastoreOperations

      @NonNull protected final @NonNull AsyncRepositoryOperations asyncDatastoreOperations
  • Constructor Details

    • AbstractAsyncInterceptor

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

    • getReturnType

      protected final io.micronaut.core.type.Argument<?> getReturnType(io.micronaut.aop.MethodInvocationContext<?,?> context)
      Description copied from class: AbstractQueryInterceptor
      Returns the return type.
      Overrides:
      getReturnType in class AbstractQueryInterceptor<T,CompletionStage<R>>
      Parameters:
      context - The context
      Returns:
      the return type
    • findReturnType

      protected final io.micronaut.core.type.Argument<?> findReturnType(io.micronaut.aop.MethodInvocationContext<?,?> context, io.micronaut.core.type.Argument<?> defaultArg)
    • convertNumberToReturnType

      @Nullable protected @Nullable Number convertNumberToReturnType(io.micronaut.aop.MethodInvocationContext<?,?> context, Number number)
      Convert a number argument if necessary.
      Parameters:
      context - The method context
      number - The number
      Returns:
      The result