Class: Handlers::BasicHandler
- Inherits:
-
Qpid::Proton::MessagingHandler
- Object
- Qpid::Proton::MessagingHandler
- Handlers::BasicHandler
- Defined in:
- lib/handlers/basic_handler.rb
Overview
Basic events handler for all clients
Direct Known Subclasses
Instance Attribute Summary collapse
-
#broker ⇒ Object
URI of broker.
-
#exit_timer ⇒ Object
Exit timer limits the run-time of the application.
-
#idle_timeout ⇒ Object
Idle timeout.
-
#log_lib ⇒ Object
Client library logging.
-
#max_frame_size ⇒ Object
Max frame size.
-
#sasl_enabled ⇒ Object
SASL enabled.
-
#sasl_mechs ⇒ Object
Allowed SASL mechs.
Instance Method Summary collapse
-
#initialize(broker, sasl_mechs, idle_timeout, max_frame_size, sasl_enabled, log_lib, exit_timer) ⇒ BasicHandler
constructor
- Initialization of basic events handler for all clients ==== Basic events handler arguments broker
-
URI of broker sasl_mechs: allowed SASL mechanisms.
Constructor Details
#initialize(broker, sasl_mechs, idle_timeout, max_frame_size, sasl_enabled, log_lib, exit_timer) ⇒ BasicHandler
Initialization of basic events handler for all clients
Basic events handler arguments
- broker
-
URI of broker
sasl_mechs: allowed SASL mechanisms
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/handlers/basic_handler.rb', line 44 def initialize( broker, sasl_mechs, idle_timeout, max_frame_size, sasl_enabled, log_lib, exit_timer ) super() @exit_timer = exit_timer # Save URI of broker if broker.is_a? URI::AMQP or broker.is_a? URI::AMQPS @broker = broker else @broker = Qpid::Proton.uri(broker) end # Save allowed SASL mechanisms @sasl_mechs = sasl_mechs # Save idle timeout @idle_timeout = idle_timeout # Save max frame size @max_frame_size = max_frame_size # Save SASL enabled @sasl_enabled = sasl_enabled # Save client library logging @log_lib = log_lib # Set environment variable for client library logging EnvUtils.set_log_lib_env(@log_lib) end |
Instance Attribute Details
#broker ⇒ Object
URI of broker
28 29 30 |
# File 'lib/handlers/basic_handler.rb', line 28 def broker @broker end |
#exit_timer ⇒ Object
Exit timer limits the run-time of the application
26 27 28 |
# File 'lib/handlers/basic_handler.rb', line 26 def exit_timer @exit_timer end |
#idle_timeout ⇒ Object
Idle timeout
32 33 34 |
# File 'lib/handlers/basic_handler.rb', line 32 def idle_timeout @idle_timeout end |
#log_lib ⇒ Object
Client library logging
38 39 40 |
# File 'lib/handlers/basic_handler.rb', line 38 def log_lib @log_lib end |
#max_frame_size ⇒ Object
Max frame size
34 35 36 |
# File 'lib/handlers/basic_handler.rb', line 34 def max_frame_size @max_frame_size end |
#sasl_enabled ⇒ Object
SASL enabled
36 37 38 |
# File 'lib/handlers/basic_handler.rb', line 36 def sasl_enabled @sasl_enabled end |
#sasl_mechs ⇒ Object
Allowed SASL mechs
30 31 32 |
# File 'lib/handlers/basic_handler.rb', line 30 def sasl_mechs @sasl_mechs end |