Definition at line 20 of file sendEI_SPB_Lib.py.
◆ __init__()
def python.sendEI_SPB_Lib.MSG.__init__ |
( |
|
self, |
|
|
|
opt |
|
) |
| |
Definition at line 22 of file sendEI_SPB_Lib.py.
24 self.brokers = opt.endpoint
26 self.passcode = opt.passcode
27 self.queue = opt.queue
28 self.verbose = opt.verbose
29 self.dummy = opt.dummy
◆ close()
def python.sendEI_SPB_Lib.MSG.close |
( |
|
self | ) |
|
Definition at line 66 of file sendEI_SPB_Lib.py.
67 if self.conn
is not None:
68 self.conn.disconnect()
◆ connect()
def python.sendEI_SPB_Lib.MSG.connect |
( |
|
self | ) |
|
Definition at line 39 of file sendEI_SPB_Lib.py.
47 log.debug(
"Broker IPs and ports to connect:")
48 for broker
in self.brokers:
49 log.debug(
" {:15s} {}".
format(*broker))
52 conn = stomp.Connection(self.brokers)
53 conn.set_listener(
'', MyListener())
55 if self.user
is not None and self.passcode
is not None:
56 log.debug(
"Conecting broker using user and password")
57 conn.connect(self.user, self.passcode, wait=
True)
59 conn.connect(wait=
True)
60 except stomp.exception.ConnectFailedException:
◆ isConnected()
def python.sendEI_SPB_Lib.MSG.isConnected |
( |
|
self | ) |
|
◆ sendMSG()
def python.sendEI_SPB_Lib.MSG.sendMSG |
( |
|
self, |
|
|
|
msg |
|
) |
| |
Definition at line 71 of file sendEI_SPB_Lib.py.
71 def sendMSG(self, msg):
73 log.debug(
"Sending message. Len: {}".
format(len(msg)))
79 self.conn.send(self.queue, msg,
80 JMSDeliveryMode=PERSISTENT,
83 print(msg, file=sys.stderr)
◆ brokers
python.sendEI_SPB_Lib.MSG.brokers |
◆ conn
python.sendEI_SPB_Lib.MSG.conn |
◆ dummy
python.sendEI_SPB_Lib.MSG.dummy |
◆ passcode
python.sendEI_SPB_Lib.MSG.passcode |
◆ queue
python.sendEI_SPB_Lib.MSG.queue |
◆ user
python.sendEI_SPB_Lib.MSG.user |
◆ verbose
python.sendEI_SPB_Lib.MSG.verbose |
The documentation for this class was generated from the following file: