bondpy::Bond Class Reference
Forms a bond to monitor another process.
More...
List of all members.
Detailed Description
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.
Definition at line 81 of file bondpy.py.
Member Function Documentation
def bondpy::Bond::__del__ |
( |
|
self |
) |
|
def bondpy::Bond::__init__ |
( |
|
self, |
|
|
|
topic, |
|
|
|
id, |
|
|
|
on_broken = None , |
|
|
|
on_formed = None | |
|
) |
| | |
Constructs a bond, but does not connect.
- Parameters:
-
| 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. |
Definition at line 89 of file bondpy.py.
def bondpy::Bond::__repr__ |
( |
|
self |
) |
|
def bondpy::Bond::_flush_pending_callbacks |
( |
|
self |
) |
[private] |
def bondpy::Bond::_on_bond_status |
( |
|
self, |
|
|
|
msg | |
|
) |
| | [private] |
def bondpy::Bond::_on_connect_timeout |
( |
|
self |
) |
[private] |
def bondpy::Bond::_on_disconnect_timeout |
( |
|
self |
) |
[private] |
def bondpy::Bond::_on_heartbeat_timeout |
( |
|
self |
) |
[private] |
def bondpy::Bond::_publish |
( |
|
self, |
|
|
|
active | |
|
) |
| | [private] |
def bondpy::Bond::_publishing_thread |
( |
|
self |
) |
[private] |
def bondpy::Bond::break_bond |
( |
|
self |
) |
|
Breaks the bond, notifying the other process.
Definition at line 333 of file bondpy.py.
def bondpy::Bond::Connected |
( |
|
self |
) |
|
def bondpy::Bond::Death |
( |
|
self |
) |
|
def bondpy::Bond::get_connect_timeout |
( |
|
self |
) |
|
def bondpy::Bond::get_disconnect_timeout |
( |
|
self |
) |
|
def bondpy::Bond::get_heartbeat_period |
( |
|
self |
) |
|
def bondpy::Bond::get_heartbeat_timeout |
( |
|
self |
) |
|
def bondpy::Bond::Heartbeat |
( |
|
self |
) |
|
def bondpy::Bond::is_broken |
( |
|
self |
) |
|
Indicates if the bond is broken.
- Returns:
- true iff the bond has been broken.
Definition at line 328 of file bondpy.py.
def bondpy::Bond::set_broken_callback |
( |
|
self, |
|
|
|
on_broken | |
|
) |
| | |
Sets the broken callback.
Definition at line 286 of file bondpy.py.
def bondpy::Bond::set_connect_timeout |
( |
|
self, |
|
|
|
dur | |
|
) |
| | |
def bondpy::Bond::set_disconnect_timeout |
( |
|
self, |
|
|
|
dur | |
|
) |
| | |
def bondpy::Bond::set_formed_callback |
( |
|
self, |
|
|
|
on_formed | |
|
) |
| | |
Sets the formed callback.
Definition at line 281 of file bondpy.py.
def bondpy::Bond::set_heartbeat_period |
( |
|
self, |
|
|
|
per | |
|
) |
| | |
def bondpy::Bond::set_heartbeat_timeout |
( |
|
self, |
|
|
|
dur | |
|
) |
| | |
def bondpy::Bond::shutdown |
( |
|
self |
) |
|
def bondpy::Bond::SisterDied |
( |
|
self |
) |
|
def bondpy::Bond::start |
( |
|
self |
) |
|
Starts the bond and connects to the sister process.
Definition at line 151 of file bondpy.py.
def bondpy::Bond::StartDying |
( |
|
self |
) |
|
def bondpy::Bond::wait_until_broken |
( |
|
self, |
|
|
|
timeout = None | |
|
) |
| | |
Blocks until the bond is broken for at most 'duration'.
- Parameters:
-
| timeout | Maximum duration to wait. If None then this call will not timeout. |
- Returns:
- true iff the bond has been broken, even if it has never been formed.
Definition at line 312 of file bondpy.py.
def bondpy::Bond::wait_until_formed |
( |
|
self, |
|
|
|
timeout = None | |
|
) |
| | |
Blocks until the bond is formed for at most 'duration'.
- Parameters:
-
| timeout | Maximum duration to wait. If None then this call will not timeout. |
- Returns:
- true iff the bond has been formed.
Definition at line 294 of file bondpy.py.
Member Data Documentation
Property Documentation
bondpy::Bond::connect_timeout = property(get_connect_timeout, set_connect_timeout) [static] |
bondpy::Bond::disconnect_timeout = property(get_disconnect_timeout, set_disconnect_timeout) [static] |
bondpy::Bond::heartbeat_period = property(get_heartbeat_period, set_heartbeat_period) [static] |
bondpy::Bond::heartbeat_timeout = property(get_heartbeat_timeout, set_heartbeat_timeout) [static] |
The documentation for this class was generated from the following file: