Interceptor that keeps track of commands and the events that were dispatched as a result of handling that command. The AuditingInterceptor uses the current Unit Of Work to track all events being stored and published. The auditing information provided by the {@link org.axonframework.auditing.AuditDataProvider} is attached to each of these eventsjust before the Unit Of Work is committed. After the Unit Of Work has been committed, an optional {@link org.axonframework.auditing.AuditLogger} may write an entry to the audit logs.
Note that this class requires a Unit Of Work to be available. This means that you should always configure a Unit Of Work interceptor
before the AuditingInterceptor. Failure to do so will result in an {@link org.axonframework.common.AxonConfigurationException}.
The auditing interceptor can only attach meta data to event whose {@link org.axonframework.domain.EventMessage#getMetaData()} methods returns an instance of {@link org.axonframework.domain.MetaData}, which is the default behavior for any event implementation provided by Axon.
@author Allard Buijze
@since 0.7