Class: ReceiverClient

Inherits:
Object
  • Object
show all
Defined in:
lib/receiver_client.rb

Overview

ReceiverClient parses arguments and runs receiver

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ ReceiverClient

Initialization of receiver client, parsing receiver client arguments and receiver client run

Parameters

args

receiver client arguments



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/receiver_client.rb', line 30

def initialize(args)
  # Parse arguments
  receiver_options_parser = Options::ReceiverOptionParser.new(args)
  # Create receiver handler
  receiver_handler = Handlers::ReceiverHandler.new(
    receiver_options_parser.options.broker,
    receiver_options_parser.options.log_msgs,
    receiver_options_parser.options.msg_content_hashed,
    receiver_options_parser.options.count,
    receiver_options_parser.options.prefetch,
    receiver_options_parser.options.process_reply_to,
    receiver_options_parser.options.browse,
    receiver_options_parser.options.selector,
    receiver_options_parser.options.sasl_mechs,
    receiver_options_parser.options.idle_timeout,
    receiver_options_parser.options.max_frame_size,
    receiver_options_parser.options.sasl_enabled,
    receiver_options_parser.options.log_lib,
    receiver_options_parser.options.recv_listen,
    receiver_options_parser.options.recv_listen_port,
    receiver_options_parser.options.auto_settle_off,
    receiver_options_parser.options.exit_timer,
    receiver_options_parser.options.duration,
    receiver_options_parser.options.duration_mode
  )
  # Run receiver client
  Qpid::Proton::Container.new(receiver_handler).run
end