Class AbstractConvertCompletionStageInterceptor<T>
java.lang.Object
io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,CompletionStage<R>>
io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor<Object,T>
io.micronaut.data.runtime.intercept.async.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
-
Field Summary
Fields inherited from class io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor
asyncDatastoreOperations, LIST_OF_OBJECTSFields inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
conversionService, operations, preparedQueryResolver -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor. -
Method Summary
Modifier and TypeMethodDescriptionintercept(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<Object, CompletionStage<T>> context) Intercepts a data method execution.protected abstract CompletionStage<?>interceptCompletionStage(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<Object, CompletionStage<T>> context) Intercept CompletionStage.Methods inherited from class io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor
convertNumberToReturnType, findReturnType, getReturnTypeMethods inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
convertOne, convertOne, count, findEntitiesParameter, findEntityParameter, getDeleteAllBatchOperation, getDeleteBatchOperation, getDeleteBatchOperation, getDeleteOperation, getDeleteReturningBatchOperation, getDeleteReturningOperation, getEntitiesParameter, getEntityParameter, getInsertBatchOperation, getInsertBatchOperation, getInsertOperation, getInsertOperation, getPageable, getPagedQuery, getParameterValueMap, getRequiredEntity, getRequiredRootEntity, getUpdateAllBatchOperation, getUpdateOperation, getUpdateOperation, instantiateEntity, isNullable, isNumber, prepareCountQuery, prepareQuery, prepareQuery, prepareQuery, validateNullArguments
-
Constructor Details
-
AbstractConvertCompletionStageInterceptor
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 keycontext- 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:DataInterceptorIntercepts a data method execution.- Parameters:
methodKey- The method keycontext- The context- Returns:
- The result
-