class Synapse::Configuration::CommandGatewayDefinitionBuilder
Definition
builder used to create a command gateway
@example The minimum possible effort to build a command gateway
gateway
@example Create a command gateway using an alternate command bus
gateway :alt_gateway do use_command_bus :alt_command_bus end
@todo Support for command filters and retry scheduler
Public Instance Methods
use_command_bus(command_bus)
click to toggle source
Changes the command bus that commands are sent from the gateway
@see Command::CommandBus
@param [Symbol] command_bus @return [undefined]
# File lib/synapse/configuration/component/command_bus/gateway.rb, line 20 def use_command_bus(command_bus) @command_bus = command_bus end
Protected Instance Methods
populate_defaults()
click to toggle source
@return [undefined]
# File lib/synapse/configuration/component/command_bus/gateway.rb, line 27 def populate_defaults identified_by :gateway use_command_bus :command_bus use_factory do command_bus = resolve @command_bus Command::CommandGateway.new command_bus end end