Class HelidonInterceptor.Base<W>

  • Type Parameters:
    W - type of work items processed by the interceptor implementation
    All Implemented Interfaces:
    HelidonInterceptor<W>
    Enclosing interface:
    HelidonInterceptor<W>

    @Dependent
    public abstract static class HelidonInterceptor.Base<W>
    extends Object
    implements HelidonInterceptor<W>
    HelidonInterceptor implementation providing as much logic as possible.

    The two methods implemented here cannot be default methods on the interface because annotation processing for @AroundConstruct and @AroundInvoke does not recognize their placement on default interface methods.

    • Constructor Detail

      • Base

        public Base()
    • Method Detail

      • aroundConstruct

        public Object aroundConstruct​(javax.interceptor.InvocationContext context)
                               throws Exception
        Description copied from interface: HelidonInterceptor
        Invoked during the intercepted constructor invocation.

        Typically, concrete implementations should extend HelidonInterceptor.Base which implements this method with @AroundConstruct. Annotation processing for @AroundConstruct does not recognize the annotation on a default method implementation defined on the interface.

        Specified by:
        aroundConstruct in interface HelidonInterceptor<W>
        Parameters:
        context - the invocation context for the intercepted call
        Returns:
        the value returned from the intercepted constructor
        Throws:
        Exception - if the invoked constructor throws an exception
      • aroundInvoke

        public Object aroundInvoke​(javax.interceptor.InvocationContext context)
                            throws Exception
        Description copied from interface: HelidonInterceptor
        Invoked during the intercepted method invocation.

        Typically, concrete implementations should extend HelidonInterceptor.Base which implements this method with @AroundInvoke. Annotation processing for @AroundInvoke does not recognize the annotation on a default method implementation defined on the interface.

        Specified by:
        aroundInvoke in interface HelidonInterceptor<W>
        Parameters:
        context - the invocation context for the intercepted call
        Returns:
        the value returned from the intercepted method
        Throws:
        Exception - if the invoked method throws an exception