def connect(options = {})
conn = self.connection(options[:handler])
conn.container = self.container_id || generate_uuid
connector = Connector.new(conn)
conn.overrides = connector
if !options[:url].nil?
connector.address = URLs.new([options[:url]])
elsif !options[:urls].nil?
connector.address = URLs.new(options[:urls])
elsif !options[:address].nil?
connector.address = URLs.new([Qpid::Proton::URL.new(options[:address])])
else
raise ::ArgumentError.new("either :url or :urls or :address required")
end
connector.heartbeat = options[:heartbeat] if !options[:heartbeat].nil?
if !options[:reconnect].nil?
connector.reconnect = options[:reconnect]
else
connector.reconnect = Backoff.new()
end
connector.ssl_domain = SessionPerConnection.new
conn.open
return conn
end