The instances of bulkrole.manager class expose a standard list interface, where list items must be tuples of (address, data) that represent destination address (given in socket module notation), outbound data (string) item to send to remote server on input and source address, inbound data item on list output as received from remote server process.
The following methods are defined to instances of the bulkrole.manager class:
Attempt to send out pending requests (previously committed to class instance as list members), wait for replies for manager.timeout seconds and receive those arrived in time.
Timed out requests would be represented by a tuple of (None, None) in list member on list output.
Drop request or response tuples from the list. This method should be invoked before re-using the same instance of bulkrole.manager class.
The following methods comprise standard list interface:
Append request tuple (dst, req) to the list of requests.
This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.
Insert request tuple (dst, req) at list position idx (integer).
This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.
Remove the first occurrence of the (dst, req) request tuple.
This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.
Remove from list and return request tuple item at index idx (default last).
Return request tuple item at index idx.
Return number of occurrences of request tuple (dst, req) in the list.
Return index of first occurrence of request tuple (dst, req) in the list.
This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.
Objects of the bulkrole.manager class have the following public instance variables:
Specify for how many seconds to wait for response from remote servers. The timeout attribute is of floating point type.
The default is 1.0 second.
Specify the number of request re-transmissions. The retries attribute is of integer type.
The default is 3 retries.