Class: Qpid::Proton::Reactor::Container Deprecated
- Includes:
- Util::Deprecation
- Defined in:
- lib/reactor/container.rb
Overview
Deprecated.
use Container
Constant Summary
Constants included from Util::Deprecation
Util::Deprecation::DEPRECATE_FULL_TRACE, Util::Deprecation::MATCH_DIR
Instance Attribute Summary
Attributes inherited from Container
#auto_stop, #handler, #id, #stopped
Instance Method Summary collapse
- #connect(opts = nil) ⇒ Object
- #create_receiver(context, opts = nil) ⇒ Object
- #create_sender(context, opts = nil) ⇒ Object
-
#initialize(handlers, opts = nil) ⇒ Container
constructor
deprecated
Deprecated.
use Container
- #listen(url, ssl_domain = nil) ⇒ Object
Methods included from Util::Deprecation
deprecated, #deprecated, included
Methods inherited from Container
#connect_io, #inspect, #listen_io, #run, #running, #schedule, #stop, #to_s, #work_queue
Methods included from TimeCompare
Constructor Details
#initialize(handlers, opts = nil) ⇒ Container
Deprecated.
use Container
Returns a new instance of Container.
32 33 34 35 36 37 |
# File 'lib/reactor/container.rb', line 32 def initialize(handlers, opts=nil) deprecated Qpid::Proton::Reactor::Container, Qpid::Proton::Container h = handlers || (opts && opts[:global_handler]) || Handler::ReactorMessagingAdapter.new(nil) id = opts && opts[:container_id] super(h, id) end |
Instance Method Details
#connect(opts = nil) ⇒ Object
42 43 44 45 46 |
# File 'lib/reactor/container.rb', line 42 def connect(opts=nil) url = opts && (opts[:url] || opts[:address]) raise ::ArgumentError.new, "no :url or :address option provided" unless url super(url, opts) end |
#create_receiver(context, opts = nil) ⇒ Object
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/reactor/container.rb', line 59 def create_receiver(context, opts=nil) c = context if context.is_a? Qpid::Proton::Connection unless c url = Qpid::Proton::uri context c = super_connect(url, opts) opts ||= {} opts[:source] ||= url.amqp_address end c.open_receiver opts end |
#create_sender(context, opts = nil) ⇒ Object
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/reactor/container.rb', line 48 def create_sender(context, opts=nil) c = context if context.is_a? Qpid::Proton::Connection unless c url = Qpid::Proton::uri context c = super_connect(url, opts) opts ||= {} opts[:target] ||= url.amqp_address end c.open_sender opts end |
#listen(url, ssl_domain = nil) ⇒ Object
70 71 72 73 |
# File 'lib/reactor/container.rb', line 70 def listen(url, ssl_domain = nil) # TODO aconway 2017-11-29: ssl_domain super(url) end |