Forms a bond to monitor another process. More...

Public Member Functions | |
| def | __del__ (self) |
| def | __init__ (self, topic, id, on_broken=None, on_formed=None) |
| Constructs a bond, but does not connect. More... | |
| def | __repr__ (self) |
| def | break_bond (self) |
| Breaks the bond, notifying the other process. More... | |
| def | Connected (self) |
| INTERNAL. More... | |
| def | Death (self) |
| INTERNAL. More... | |
| def | get_connect_timeout (self) |
| def | get_disconnect_timeout (self) |
| def | get_heartbeat_period (self) |
| def | get_heartbeat_timeout (self) |
| def | Heartbeat (self) |
| INTERNAL. More... | |
| def | is_broken (self) |
| Indicates if the bond is broken. More... | |
| def | set_broken_callback (self, on_broken) |
| Sets the broken callback. More... | |
| def | set_connect_timeout (self, dur) |
| def | set_disconnect_timeout (self, dur) |
| def | set_formed_callback (self, on_formed) |
| Sets the formed callback. More... | |
| def | set_heartbeat_period (self, per) |
| def | set_heartbeat_timeout (self, dur) |
| def | shutdown (self) |
| def | SisterDied (self) |
| INTERNAL. More... | |
| def | start (self) |
| Starts the bond and connects to the sister process. More... | |
| def | StartDying (self) |
| INTERNAL. More... | |
| def | wait_until_broken (self, timeout=None) |
| Blocks until the bond is broken for at most 'duration'. More... | |
| def | wait_until_formed (self, timeout=None) |
| Blocks until the bond is formed for at most 'duration'. More... | |
Properties | |
| connect_timeout = property(get_connect_timeout, set_connect_timeout) | |
| disconnect_timeout = property(get_disconnect_timeout, set_disconnect_timeout) | |
| heartbeat_period = property(get_heartbeat_period, set_heartbeat_period) | |
| heartbeat_timeout = property(get_heartbeat_timeout, set_heartbeat_timeout) | |
Private Member Functions | |
| def | _flush_pending_callbacks (self) |
| def | _on_bond_status (self, msg) |
| def | _on_connect_timeout (self) |
| def | _on_disconnect_timeout (self) |
| def | _on_heartbeat_timeout (self) |
| def | _publish (self, active) |
| def | _publishing_thread (self) |
Private Attributes | |
| __connect_timeout | |
| __disconnect_timeout | |
| __heartbeat_period | |
| __heartbeat_timeout | |
| __started | |
Forms a bond to monitor another process.
The Bond class implements a bond, allowing you to monitor another process and be notified when it dies. In turn, it will be notified when you die.
| def bondpy.bondpy.Bond.__init__ | ( | self, | |
| topic, | |||
| id, | |||
on_broken = None, |
|||
on_formed = None |
|||
| ) |
Constructs a bond, but does not connect.
| topic | The topic used to exchange the bond status messages. |
| id | The ID of the bond, which should match the ID used on the sister's end |
| on_broken | callback that will be called when the bond is broken. |
| on_formed | callback that will be called when the bond is formed. |
|
private |
|
private |
|
private |
|
private |
|
private |
| def bondpy.bondpy.Bond.break_bond | ( | self | ) |
| def bondpy.bondpy.Bond.is_broken | ( | self | ) |
| def bondpy.bondpy.Bond.set_broken_callback | ( | self, | |
| on_broken | |||
| ) |
| def bondpy.bondpy.Bond.set_disconnect_timeout | ( | self, | |
| dur | |||
| ) |
| def bondpy.bondpy.Bond.set_formed_callback | ( | self, | |
| on_formed | |||
| ) |
| def bondpy.bondpy.Bond.set_heartbeat_timeout | ( | self, | |
| dur | |||
| ) |
| def bondpy.bondpy.Bond.start | ( | self | ) |
| def bondpy.bondpy.Bond.wait_until_broken | ( | self, | |
timeout = None |
|||
| ) |
| def bondpy.bondpy.Bond.wait_until_formed | ( | self, | |
timeout = None |
|||
| ) |
|
static |
|
static |
|
static |
|
static |