Class: Synapse::Command::CommandCallback

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse/command/command_callback.rb

Overview

Callback that is notified of the outcome of the dispatch of a command

Direct Known Subclasses

FutureCallback, RetryingCallback

Instance Method Summary collapse

Instance Method Details

#on_failure(exception) ⇒ undefined

Called when a dispatch fails due to an exception

Parameters:

  • exception (Exception)

    The cause of the failure

Returns:

  • (undefined)


15
# File 'lib/synapse/command/command_callback.rb', line 15

def on_failure(exception); end

#on_success(result) ⇒ undefined

Called when a dispatch is successful

Parameters:

  • result (Object)

    The result from the command handler

Returns:

  • (undefined)


9
# File 'lib/synapse/command/command_callback.rb', line 9

def on_success(result); end