Package io.micronaut.aop
Interface MethodInterceptor<T,R>
- Type Parameters:
T
- The declaring typeR
- The result of the method call
- All Superinterfaces:
Interceptor<T,
,R> Ordered
- All Known Implementing Classes:
AsyncInterceptor
,ClientWebSocketInterceptor
,ConfigurationIntroductionAdvice
,DefaultRetryInterceptor
,FunctionClientAdvice
,HttpClientIntroductionAdvice
,RecoveryInterceptor
,RefreshInterceptor
A MethodInterceptor extends the generic
Interceptor
and provides an interface more specific to method interception.- Since:
- 1.0
- Author:
- Graeme Rocher
-
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
Modifier and TypeMethodDescriptiondefault R
intercept
(InvocationContext<T, R> context) Intercepts an execution from a declaredAround
advice.intercept
(MethodInvocationContext<T, R> context) Extended version of theintercept(InvocationContext)
method that accepts aMethodInvocationContext
.
-
Method Details
-
intercept
Extended version of theintercept(InvocationContext)
method that accepts aMethodInvocationContext
.- Parameters:
context
- The context- Returns:
- The result
-
intercept
Description copied from interface:Interceptor
Intercepts an execution from a declaredAround
advice. The implementation can either callInvocationContext.proceed()
to return the original value or provide a replacement value- Specified by:
intercept
in interfaceInterceptor<T,
R> - Parameters:
context
- The interception context- Returns:
- result type
-