Class SynchronousInterceptedMethod

  • All Implemented Interfaces:
    InterceptedMethod

    @Internal
    public class SynchronousInterceptedMethod
    extends java.lang.Object
    implements InterceptedMethod
    The synchronous method intercept.
    Since:
    2.1.0
    • Method Detail

      • returnTypeValue

        public io.micronaut.core.type.Argument<?> returnTypeValue()
        Description copied from interface: InterceptedMethod
        Returns result type value.
        Specified by:
        returnTypeValue in interface InterceptedMethod
        Returns:
        The return type value.
      • 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 interface InterceptedMethod
        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 interface InterceptedMethod
        Type Parameters:
        E - Sneaky throws helper
        Parameters:
        exception - The exception
        Returns:
        The result of the invocation being returned from the interceptor
        Throws:
        E - The exception
        E extends java.lang.Throwable