Class: Synapse::Auditing::AuditLogger Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse/auditing/audit_logger.rb

Overview

This class is abstract.

Represents a mechanism for auditing commands and the events produced by their execution

Instance Method Summary collapse

Instance Method Details

#on_failure(command, exception, events) ⇒ undefined

This method is abstract.

Called when a command execution results in an exception being raised

The list of events may not be empty; in this case, some events could have been published to the event bus and/or appended to the event store.

Parameters:

  • command (CommandMessage)
  • exception (Exception)
  • events (Array<EventMessage>)

Returns:

  • (undefined)

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/synapse/auditing/audit_logger.rb', line 27

def on_failure(command, exception, events)
  raise NotImplementedError
end

#on_success(command, return_value, events) ⇒ undefined

This method is abstract.

Called when a command execution was finished successfully

Parameters:

  • command (CommandMessage)
  • return_value (Object)
  • events (Array<EventMessage>)

Returns:

  • (undefined)

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/synapse/auditing/audit_logger.rb', line 13

def on_success(command, return_value, events)
  raise NotImplementedError
end