Interface ManagedAuditLogger.AuditLogHandlerUpdater

All Known Implementing Classes:
ManagedAuditLoggerImpl
Enclosing interface:
ManagedAuditLogger

public static interface ManagedAuditLogger.AuditLogHandlerUpdater

The audit log handler updater. Additive changes will be used for the audit log record as a result of management operations causing updates here. Removals and updates will not take effect until the current audit log record has been written.

This means that if a new handler is added and a reference is added, the new handler will be used to log the operations causing that to happen.

If a handler is removed, the operations causing the removal will be logged to the handler, before removing it.

If a handler is changed, for example to change the location of a file handler or the protocol of a syslog handler, the operations causing the change will be logged to the current handler location. The next incoming log message will be written to the new handler location.

  • Method Summary

    Modifier and Type
    Method
    Description
    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
    Apply the changes.
    void
    Remove a handler.
    void
    Add a handler reference.
    void
    Roll back changes made as part of the current operation.
    void
    updateHandler(org.jboss.as.controller.audit.AuditLogHandler handler)
    Update a handler.
  • Method Details

    • addHandler

      void addHandler(org.jboss.as.controller.audit.AuditLogHandler handler)
      Adds a new handler, this handler will be used when logging the current operation
      Parameters:
      handler - the handler
    • updateHandler

      void updateHandler(org.jboss.as.controller.audit.AuditLogHandler handler)
      Update a handler. The update will only take place if the handler has actually been changed. The changes to the handler will only take effect after the current operation has been logged.
      Parameters:
      handler - the updated handler
    • removeHandler

      void removeHandler(String name)
      Remove a handler. The removal will only take effect after the current operation has been logged.
      Parameters:
      name - the name of the handler to be removed
      Throws:
      IllegalStateException - if the handler still has references to it
    • addHandlerReference

      void addHandlerReference(PathAddress referenceAddress)
      Add a handler reference. This reference will take effect when logging the current operation
      Parameters:
      referenceAddress - the address of the handler reference (the value of the last element is the name of the referenced handler)
    • removeHandlerReference

      void removeHandlerReference(PathAddress referenceAddress)
      Add a handler reference. This reference removal will only take effect after the current operation has been logged.
      Parameters:
      referenceAddress - the address of the handler reference (the value of the last element is the name of the referenced handler)
    • rollbackChanges

      void rollbackChanges()
      Roll back changes made as part of the current operation.
    • applyChanges

      void applyChanges()
      Apply the changes. This is only allowed for update tasks for new audit log configurations which specify that manual commit should be used.
      Throws:
      IllegalStateException - if manual commit should not be used