public class StreamAuditEventListener extends Object implements EventListener, Synchronization
Modifier and Type | Field and Description |
---|---|
static String |
AUDIT_LOG_CONFIG_PROP |
static String |
DEFAULT_LOG_CONFIG |
protected static ThreadLocal<List<LogEntry>> |
entries |
protected static ThreadLocal<Boolean> |
isEnlisted |
static String |
STREAM_AUDIT_ENABLED_PROP |
static String |
STREAM_NAME |
Constructor and Description |
---|
StreamAuditEventListener() |
Modifier and Type | Method and Description |
---|---|
void |
afterCompletion(int status) |
protected String |
asJson(LogEntry entry) |
void |
beforeCompletion() |
protected String |
getLogConfig() |
protected LogManager |
getLogManager() |
void |
handleEvent(Event event)
Handle the given event.
|
protected boolean |
registerSynchronization(Synchronization sync) |
protected void |
writeEntries() |
protected void |
writeEntry(LogAppender<Record> appender,
LogEntry entry) |
protected static final ThreadLocal<Boolean> isEnlisted
protected static final ThreadLocal<List<LogEntry>> entries
public static final String STREAM_AUDIT_ENABLED_PROP
public static final String AUDIT_LOG_CONFIG_PROP
public static final String DEFAULT_LOG_CONFIG
public static final String STREAM_NAME
public StreamAuditEventListener()
public void handleEvent(Event event)
EventListener
Event.cancel()
handleEvent
in interface EventListener
event
- the eventpublic void beforeCompletion()
beforeCompletion
in interface Synchronization
public void afterCompletion(int status)
afterCompletion
in interface Synchronization
protected void writeEntries()
protected void writeEntry(LogAppender<Record> appender, LogEntry entry)
protected boolean registerSynchronization(Synchronization sync)
protected LogManager getLogManager()
protected String getLogConfig()
Copyright © 2018 Nuxeo. All rights reserved.