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.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.helidon.microprofile.servicecommon.HelidonInterceptor

    HelidonInterceptor.Base<W>, HelidonInterceptor.WithPostCompletion<W>
  • Method Summary

    Modifier and Type
    Method
    Description
    default Object
    aroundConstruction(jakarta.interceptor.InvocationContext context)
    Invokes the implementation's preInvocation and postCompletion logic for a constructor, once for each work item associated with the constructor.
    default Object
    aroundInvocation(jakarta.interceptor.InvocationContext context)
    Invokes the implementation's preInvocation and postCompletion logic for a constructor, once for each work item associated with the method.
    void
    postCompletion(jakarta.interceptor.InvocationContext context, Throwable throwable, W workItem)
    Performs whatever post-completion work is needed for the given context, applied to the specified work item.

    Methods inherited from interface io.helidon.microprofile.servicecommon.HelidonInterceptor

    aroundConstruct, aroundInvoke, preInvocation, workItems
  • Method Details

    • aroundConstruction

      default Object aroundConstruction(jakarta.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(jakarta.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(jakarta.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