Package pulp :: Package messaging :: Module broker :: Class Broker
[hide private]
[frames] | no frames]

Class Broker

source code

Represents an AMQP broker.

Instance Methods [hide private]
 
__init__(self, url) source code
str
id(self)
Get broker identifier.
source code
Connection
connect(self)
Connect to the broker.
source code
 
close(self)
Close the connection to the broker.
source code
 
__str__(self) source code
Class Methods [hide private]
 
add(cls, broker)
Add a broker to the domain.
source code
Broker
get(cls, url)
Get a broker from the domain by url.
source code
Class Variables [hide private]
dict domain = {}
A list dict of brokers.
Instance Variables [hide private]
str cacert
Path to a PEM encoded file containing the CA certificate used to validate the server certificate.
str clientcert
Path to a PEM encoded file containing the private key & certificate used for client authentication.
URL url
The broker's url.
Method Details [hide private]

add(cls, broker)
Class Method

source code 

Add a broker to the domain.

Parameters:
  • broker (Broker) - A broker to add

get(cls, url)
Class Method

source code 

Get a broker from the domain by url. Created and added if not found.

Parameters:
  • url (URL) - A broker url
Returns: Broker
The requested broker.

__init__(self, url)
(Constructor)

source code 
Parameters:
  • url (str) - The broker url <transport>://<host>:<port>.

id(self)

source code 

Get broker identifier.

Returns: str
The broker simple url.

connect(self)

source code 

Connect to the broker.

Returns: Connection
The AMQP connection object.