public class ManagedAuditLoggerImpl extends Object implements ManagedAuditLogger, ManagedAuditLogger.AuditLogHandlerUpdater
ManagedAuditLogger.AuditLogHandlerUpdaterAuditLogger.StatusNO_OP_LOGGER| Constructor and Description |
|---|
ManagedAuditLoggerImpl(String asVersion,
boolean server) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFormatter(AuditLogItemFormatter formatter)
Add a formatter
|
void |
addHandler(org.jboss.as.controller.audit.AuditLogHandler handler)
Adds a new handler, this handler will be used when logging the current operation
|
void |
addHandlerReference(PathAddress referenceAddress)
Add a handler reference.
|
void |
applyChanges()
Apply the changes.
|
void |
bootDone()
Callback for the controller to call when the controller has been booted
|
ManagedAuditLoggerImpl |
createNewConfiguration(boolean manualCommit)
Create another audit logger configuration, e.g.
|
boolean |
getHandlerDisabledDueToFailure(String name)
Get whether a handler was disabled due to failures
|
int |
getHandlerFailureCount(String name)
Get the current failure count of a handler
|
JsonAuditLogItemFormatter |
getJsonFormatter(String name)
Gets a formatter by its name
|
AuditLogger.Status |
getLoggerStatus()
Gets the status of the audit logger
|
ManagedAuditLogger.AuditLogHandlerUpdater |
getUpdater()
Gets the handler updater used to schedule updates to the handlers
|
boolean |
isLogBoot()
Get whether this audit logger logs operations on boot
|
boolean |
isLogReadOnly()
Get whether this audit logger logs read-only operations
|
void |
log(boolean readOnly,
OperationContext.ResultAction resultAction,
String userId,
String domainUUID,
AccessMechanism accessMechanism,
InetAddress remoteAddress,
Resource resultantModel,
List<org.jboss.dmr.ModelNode> operations) |
void |
logJmxMethodAccess(boolean readOnly,
String userId,
String domainUUID,
AccessMechanism accessMechanism,
InetAddress remoteAddress,
String methodName,
String[] methodSignature,
Object[] methodParams,
Throwable error) |
void |
recycleHandler(String name)
Recycles a handler.
|
void |
removeFormatter(String name)
Remove a formatter
|
void |
removeHandler(String name)
Remove a handler.
|
void |
removeHandlerReference(PathAddress referenceAddress)
Add a handler reference.
|
void |
rollbackChanges()
Roll back changes made as part of the current operation.
|
void |
setLogBoot(boolean logBoot)
Set whether to log operations on boot
|
void |
setLoggerStatus(AuditLogger.Status newStatus)
Sets the status of the audit logger
|
void |
setLogReadOnly(boolean logReadOnly)
Set whether to log read-only operations
|
void |
startBoot()
Callback for the controller to call before the controller is booted
|
void |
updateHandler(org.jboss.as.controller.audit.AuditLogHandler handler)
Update a handler.
|
void |
updateHandlerFormatter(String name,
String formatterName)
Update the handler formatter.
|
void |
updateHandlerMaxFailureCount(String name,
int count)
Update the handler max failure count.
|
void |
updateSyslogHandlerAppName(String name,
String appName)
Update the handler app-name.
|
void |
updateSyslogHandlerFacility(String name,
SyslogAuditLogHandler.Facility facility)
Update the syslog handler facility.
|
void |
updateSyslogHandlerReconnectTimeout(String name,
int reconnectTimeout)
Update the handler reconnect timeout.
|
public ManagedAuditLoggerImpl(String asVersion, boolean server)
public void log(boolean readOnly,
OperationContext.ResultAction resultAction,
String userId,
String domainUUID,
AccessMechanism accessMechanism,
InetAddress remoteAddress,
Resource resultantModel,
List<org.jboss.dmr.ModelNode> operations)
log in interface AuditLoggerpublic void logJmxMethodAccess(boolean readOnly,
String userId,
String domainUUID,
AccessMechanism accessMechanism,
InetAddress remoteAddress,
String methodName,
String[] methodSignature,
Object[] methodParams,
Throwable error)
logJmxMethodAccess in interface AuditLoggerpublic ManagedAuditLoggerImpl createNewConfiguration(boolean manualCommit)
ManagedAuditLoggercreateNewConfiguration in interface ManagedAuditLoggermanualCommit - if true the caller is responsible for applying the changes themselves, if false the changes will be committed after the next log records has been writtenpublic boolean isLogReadOnly()
ManagedAuditLoggerisLogReadOnly in interface ManagedAuditLoggerpublic void setLogReadOnly(boolean logReadOnly)
ManagedAuditLoggersetLogReadOnly in interface ManagedAuditLoggerlogReadOnly - wheter to log read-only operationspublic boolean isLogBoot()
ManagedAuditLoggerisLogBoot in interface ManagedAuditLoggerpublic void setLogBoot(boolean logBoot)
ManagedAuditLoggersetLogBoot in interface ManagedAuditLoggerlogBoot - whether to log operations on bootpublic AuditLogger.Status getLoggerStatus()
ManagedAuditLoggergetLoggerStatus in interface ManagedAuditLoggerpublic void recycleHandler(String name)
ManagedAuditLoggerrecycleHandler in interface ManagedAuditLoggername - the name of the handlerpublic void setLoggerStatus(AuditLogger.Status newStatus)
ManagedAuditLoggersetLoggerStatus in interface ManagedAuditLoggernewStatus - the statuspublic ManagedAuditLogger.AuditLogHandlerUpdater getUpdater()
ManagedAuditLoggergetUpdater in interface ManagedAuditLoggerpublic void addHandler(org.jboss.as.controller.audit.AuditLogHandler handler)
ManagedAuditLogger.AuditLogHandlerUpdateraddHandler in interface ManagedAuditLogger.AuditLogHandlerUpdaterhandler - the handlerpublic void updateHandler(org.jboss.as.controller.audit.AuditLogHandler handler)
ManagedAuditLogger.AuditLogHandlerUpdaterupdateHandler in interface ManagedAuditLogger.AuditLogHandlerUpdaterhandler - the updated handlerpublic void removeHandler(String name)
ManagedAuditLogger.AuditLogHandlerUpdaterremoveHandler in interface ManagedAuditLogger.AuditLogHandlerUpdatername - the name of the handler to be removedpublic void addHandlerReference(PathAddress referenceAddress)
ManagedAuditLogger.AuditLogHandlerUpdateraddHandlerReference in interface ManagedAuditLogger.AuditLogHandlerUpdaterreferenceAddress - the address of the handler reference (the value of the last element is the name of
the referenced handler)public void removeHandlerReference(PathAddress referenceAddress)
ManagedAuditLogger.AuditLogHandlerUpdaterremoveHandlerReference in interface ManagedAuditLogger.AuditLogHandlerUpdaterreferenceAddress - the address of the handler reference (the value of the last element is the name of
the referenced handler)public void rollbackChanges()
ManagedAuditLogger.AuditLogHandlerUpdaterrollbackChanges in interface ManagedAuditLogger.AuditLogHandlerUpdaterpublic void applyChanges()
ManagedAuditLogger.AuditLogHandlerUpdaterapplyChanges in interface ManagedAuditLogger.AuditLogHandlerUpdaterpublic void removeFormatter(String name)
ManagedAuditLoggerremoveFormatter in interface ManagedAuditLoggername - the formatter namepublic void addFormatter(AuditLogItemFormatter formatter)
ManagedAuditLoggeraddFormatter in interface ManagedAuditLoggerformatter - the formatterpublic void updateHandlerFormatter(String name, String formatterName)
ManagedAuditLoggerupdateHandlerFormatter in interface ManagedAuditLoggername - the name of the handlerformatterName - the name of the formatterpublic void updateHandlerMaxFailureCount(String name, int count)
ManagedAuditLoggerupdateHandlerMaxFailureCount in interface ManagedAuditLoggername - the name of the handlercount - the max failure countpublic int getHandlerFailureCount(String name)
ManagedAuditLoggergetHandlerFailureCount in interface ManagedAuditLoggername - the name of the handlerpublic void updateSyslogHandlerFacility(String name, SyslogAuditLogHandler.Facility facility)
ManagedAuditLoggerupdateSyslogHandlerFacility in interface ManagedAuditLoggername - the name of the syslog handlerfacility - the facilitypublic void updateSyslogHandlerAppName(String name, String appName)
ManagedAuditLoggerupdateSyslogHandlerAppName in interface ManagedAuditLoggername - the name of the handlerappName - the app namepublic void updateSyslogHandlerReconnectTimeout(String name, int reconnectTimeout)
ManagedAuditLoggerupdateSyslogHandlerReconnectTimeout in interface ManagedAuditLoggername - the name of the handlerreconnectTimeout - the app namepublic boolean getHandlerDisabledDueToFailure(String name)
ManagedAuditLoggergetHandlerDisabledDueToFailure in interface ManagedAuditLoggername - the name of the handlerpublic JsonAuditLogItemFormatter getJsonFormatter(String name)
ManagedAuditLoggergetJsonFormatter in interface ManagedAuditLoggername - the name of the formatterpublic void bootDone()
ManagedAuditLoggerbootDone in interface ManagedAuditLoggerpublic void startBoot()
ManagedAuditLoggerstartBoot in interface ManagedAuditLoggerCopyright © 2015 JBoss by Red Hat. All rights reserved.