Class SynchronousInterceptedMethod
- java.lang.Object
-
- io.micronaut.aop.internal.intercepted.SynchronousInterceptedMethod
-
- All Implemented Interfaces:
InterceptedMethod
@Internal public class SynchronousInterceptedMethod extends java.lang.Object implements InterceptedMethod
The synchronous method intercept.- Since:
- 2.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.micronaut.aop.InterceptedMethod
InterceptedMethod.ResultType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends java.lang.Throwable>
java.lang.ObjecthandleException(java.lang.Exception exception)
Handle the exception that should be thrown out of the invocation.java.lang.Object
handleResult(java.lang.Object result)
Handle the value that should be the result of the invocation.java.lang.Object
interceptResult()
Proceeds with invocation ofInvocationContext.proceed()
and converts result to appropriate type.java.lang.Object
interceptResult(Interceptor<?,?> from)
Proceeds with invocation ofInvocationContext.proceed(Interceptor)
and converts result to appropriate type.InterceptedMethod.ResultType
resultType()
Returns result type of the method.io.micronaut.core.type.Argument<?>
returnTypeValue()
Returns result type value.-
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.InterceptedMethod
interceptResultAsCompletionStage, interceptResultAsCompletionStage, interceptResultAsPublisher, interceptResultAsPublisher, interceptResultAsPublisher, unsupported
-
-
-
-
Method Detail
-
resultType
public InterceptedMethod.ResultType resultType()
Description copied from interface:InterceptedMethod
Returns result type of the method.- Specified by:
resultType
in interfaceInterceptedMethod
- Returns:
- The
InterceptedMethod.ResultType
-
returnTypeValue
public io.micronaut.core.type.Argument<?> returnTypeValue()
Description copied from interface:InterceptedMethod
Returns result type value.- Specified by:
returnTypeValue
in interfaceInterceptedMethod
- Returns:
- The return type value.
-
interceptResult
public java.lang.Object interceptResult()
Description copied from interface:InterceptedMethod
Proceeds with invocation ofInvocationContext.proceed()
and converts result to appropriate type.- Specified by:
interceptResult
in interfaceInterceptedMethod
- Returns:
- The intercepted result
-
interceptResult
public java.lang.Object interceptResult(Interceptor<?,?> from)
Description copied from interface:InterceptedMethod
Proceeds with invocation ofInvocationContext.proceed(Interceptor)
and converts result to appropriate type.- Specified by:
interceptResult
in interfaceInterceptedMethod
- Parameters:
from
- The interceptor to start from- Returns:
- The intercepted result
-
handleResult
public java.lang.Object handleResult(java.lang.Object result)
Description copied from interface:InterceptedMethod
Handle the value that should be the result of the invocation.- Specified by:
handleResult
in interfaceInterceptedMethod
- Parameters:
result
- The result of the invocation- Returns:
- The result of the invocation being returned from the interceptor
-
handleException
public <E extends java.lang.Throwable> java.lang.Object handleException(java.lang.Exception exception) throws E extends java.lang.Throwable
Description copied from interface:InterceptedMethod
Handle the exception that should be thrown out of the invocation.- Specified by:
handleException
in interfaceInterceptedMethod
- Type Parameters:
E
- Sneaky throws helper- Parameters:
exception
- The exception- Returns:
- The result of the invocation being returned from the interceptor
- Throws:
E
- The exceptionE extends java.lang.Throwable
-
-