Interface HelidonInterceptor.WithPostCompletion<W>

  • Type Parameters:
    W - type of the work item processed during interception
    All Superinterfaces:
    HelidonInterceptor<W>
    Enclosing interface:
    HelidonInterceptor<W>

    public static interface HelidonInterceptor.WithPostCompletion<W>
    extends HelidonInterceptor<W>
    Common behavior among interceptors with both pre-invocation and post-completion behavior.

    Implementing classes should extend HelidonInterceptor to inherit the provided behavior.

    • Method Detail

      • aroundConstruction

        default Object aroundConstruction​(javax.interceptor.InvocationContext context)
                                   throws Exception
        Invokes the implementation's preInvocation and postCompletion logic for a constructor, once for each work item associated with the constructor.
        Specified by:
        aroundConstruction in interface HelidonInterceptor<W>
        Parameters:
        context - InvocationContext
        Returns:
        any value returned by the intercepted Executable
        Throws:
        Exception - when the intercepted code throws an exception
      • aroundInvocation

        default Object aroundInvocation​(javax.interceptor.InvocationContext context)
                                 throws Exception
        Invokes the implementation's preInvocation and postCompletion logic for a constructor, once for each work item associated with the method.
        Specified by:
        aroundInvocation in interface HelidonInterceptor<W>
        Parameters:
        context - InvocationContext
        Returns:
        any value returned by the intercepted Executable
        Throws:
        Exception - when the intercepted code throws an exception
      • postCompletion

        void postCompletion​(javax.interceptor.InvocationContext context,
                            Throwable throwable,
                            W workItem)
        Performs whatever post-completion work is needed for the given context, applied to the specified work item.
        Parameters:
        context - InvocationContext for the execution being intercepted
        throwable - throwable from the intercepted method; null if the method returned normally
        workItem - the work item on which to operate