Class AuditedInterceptor


  • @Interceptor
    @Priority(2000)
    public class AuditedInterceptor
    extends Object
    Interceptor that executes around methods annotated with Audited This interceptor follows the execution of a method and marks the audit entry as failed if the inner method throws an exception. This interceptor reads the inner method parameters to gather extra information for the audit entry. *** IMPORTANT NOTE *** TenantId is assumed to be found in the annotated method parameters, either as an Object field or simply as a String. **Caution** Any string parameter will be considered the tenantId
    Author:
    Fabian Martinez
    • Constructor Detail

      • AuditedInterceptor

        public AuditedInterceptor()
    • Method Detail

      • auditMethod

        public Object auditMethod​(javax.interceptor.InvocationContext context)
                           throws Exception
        Throws:
        Exception