Esempio n. 1
0
    def start(self,
              response=None,
              mechanism=None,
              locale="en_US",
              tune_params=None,
              username=None,
              password=None,
              client_properties=None,
              connection_options=None,
              sasl_options=None):
        self.mechanism = mechanism
        self.response = response
        self.username = username
        self.password = password
        self.locale = locale
        self.tune_params = tune_params
        self.client_properties = get_client_properties_with_defaults(
            provided_client_properties=client_properties)
        self.sasl_options = sasl_options
        self.socket = connect(self.host, self.port, connection_options)
        self.conn = Connection(self.socket, self.spec)
        self.peer = Peer(self.conn, ClientDelegate(self), Session)

        self.conn.init()
        self.peer.start()
        self.wait()
        self.channel(0).connection_open(self.vhost)
Esempio n. 2
0
  def start(self, response=None, mechanism=None, locale="en_US", tune_params=None,
            username=None, password=None,
            client_properties=None, connection_options=None, sasl_options = None,
            channel_options=None):
    if response is not None and (username is not None or password is not None):
      raise RuntimeError("client must not specify both response and (username, password).")
    if response is not None:
      self.response = response
      authzid, self.username, self.password = response.split("\0")
    else:
      self.username = username
      self.password = password
    self.mechanism = mechanism
    self.locale = locale
    self.tune_params = tune_params
    self.client_properties=get_client_properties_with_defaults(provided_client_properties=client_properties, version_property_key="version")
    self.sasl_options = sasl_options
    self.socket = connect(self.host, self.port, connection_options)
    self.conn = Connection(self.socket, self.spec)
    self.peer = Peer(self.conn, ClientDelegate(self), Session, channel_options)

    self.conn.init()
    self.peer.start()
    self.wait()
    self.channel(0).connection_open(self.vhost)
Esempio n. 3
0
  def start(self, response=None, mechanism=None, locale="en_US", tune_params=None,
            username=None, password=None,
            client_properties=None, connection_options=None, sasl_options = None,
            channel_options=None):
    if response is not None and (username is not None or password is not None):
      raise RuntimeError("client must not specify both response and (username, password).")
    if response is not None:
      self.response = response
      authzid, self.username, self.password = response.split("\0")
    else:
      self.username = username
      self.password = password
    self.mechanism = mechanism
    self.locale = locale
    self.tune_params = tune_params
    self.client_properties=get_client_properties_with_defaults(provided_client_properties=client_properties, version_property_key="version")
    self.sasl_options = sasl_options
    self.socket = connect(self.host, self.port, connection_options)
    self.conn = Connection(self.socket, self.spec)
    self.peer = Peer(self.conn, ClientDelegate(self), Session, channel_options)

    self.conn.init()
    self.peer.start()
    self.wait()
    self.channel(0).connection_open(self.vhost)
Esempio n. 4
0
  def start(self, response, mechanism="AMQPLAIN", locale="en_US", tune_params=None):
    self.mechanism = mechanism
    self.response = response
    self.locale = locale
    self.tune_params = tune_params

    self.socket = connect(self.host, self.port)
    self.conn = Connection(self.socket, self.spec)
    self.peer = Peer(self.conn, ClientDelegate(self), Session)

    self.conn.init()
    self.peer.start()
    self.wait()
    self.channel(0).connection_open(self.vhost)
Esempio n. 5
0
    def start(self,
              response,
              mechanism="AMQPLAIN",
              locale="en_US",
              tune_params=None):
        self.mechanism = mechanism
        self.response = response
        self.locale = locale
        self.tune_params = tune_params

        self.socket = connect(self.host, self.port)
        self.conn = Connection(self.socket, self.spec)
        self.peer = Peer(self.conn, ClientDelegate(self), Session)

        self.conn.init()
        self.peer.start()
        self.wait()
        self.channel(0).connection_open(self.vhost)