org.axonframework.auditing
Interface AuditLogger

All Known Implementing Classes:
NullAuditLogger

public interface AuditLogger

Interface describing a component capable of writing auditing entries to a log.

Since:
0.7
Author:
Allard Buijze

Method Summary
 void logFailed(CommandMessage<?> command, Throwable failureCause, List<EventMessage> events)
          Writes a failure entry to the audit logs.
 void logSuccessful(CommandMessage<?> command, Object returnValue, List<EventMessage> events)
          Writes a success entry to the audit logs.
 

Method Detail

logSuccessful

void logSuccessful(CommandMessage<?> command,
                   Object returnValue,
                   List<EventMessage> events)
Writes a success entry to the audit logs.

This method may be invoked in the thread dispatching the command. Therefore, considering writing asynchronously when the underlying mechanism is slow.

Parameters:
command - The command that has been handled
returnValue - The return value of the command handler
events - The events that were generated during command handling

logFailed

void logFailed(CommandMessage<?> command,
               Throwable failureCause,
               List<EventMessage> events)
Writes a failure entry to the audit logs. The given list of events may contain events. In that case, these event may have been stored in the events store and/or published to the event bus.

This method may be invoked in the thread dispatching the command. Therefore, considering writing asynchronously when the underlying mechanism is slow.

Parameters:
command - The command being executed
failureCause - The cause of the rollback. May be null if the rollback was not caused by an exception
events - any events staged for storage or publishing


Copyright © 2010-2016. All Rights Reserved.