org.axonframework.auditing
Class NullAuditLogger
java.lang.Object
org.axonframework.auditing.NullAuditLogger
- All Implemented Interfaces:
- AuditLogger
public class NullAuditLogger
- extends Object
- implements AuditLogger
An implementation of AuditLogger
that does nothing.
- Since:
- 0.7
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final NullAuditLogger INSTANCE
- Returns a singleton instance to this logger.
NullAuditLogger
public NullAuditLogger()
logSuccessful
public 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.
This implementation does nothing.
- Specified by:
logSuccessful
in interface AuditLogger
- Parameters:
command
- The command that has been handledreturnValue
- The return value of the command handlerevents
- The events that were generated during command handling
logFailed
public 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.
This implementation does nothing.
- Specified by:
logFailed
in interface AuditLogger
- Parameters:
command
- The command being executedfailureCause
- The cause of the rollback. May be null
if the rollback was not caused by an
exceptionevents
- any events staged for storage or publishing
Copyright © 2010-2016. All Rights Reserved.