b.s.m.ConventionalRequestHandler(MessageHandler) : class documentation

Part of bzrlib.smart.message View In Hierarchy

A message handler for "conventional" requests.

"Conventional" is used in the sense described in doc/developers/network-protocol.txt: a simple message with arguments and an optional body.

Possible states:
  • args: expecting args
  • body: expecting body (terminated by receiving a post-body status)
  • error: expecting post-body error
  • end: expecting end of message
  • nothing: finished
Method __init__ Undocumented
Method protocol_error Called when there is a protocol decoding error.
Method byte_part_received Called when a 'byte' part is received.
Method structure_part_received Called when a 'structure' part is received.
Method bytes_part_received Called when a 'bytes' part is received.
Method end_received Called when the end of the message is received.
Method _args_received Undocumented
Method _error_received Undocumented

Inherited from MessageHandler:

Method headers_received Called when message headers are received.
def __init__(self, request_handler, responder):
Undocumented
def protocol_error(self, exception):
Called when there is a protocol decoding error.

The default implementation just re-raises the exception.

def byte_part_received(self, byte):
Called when a 'byte' part is received.

Note that a 'byte' part is a message part consisting of exactly one byte.

def structure_part_received(self, structure):
Called when a 'structure' part is received.
Parametersstructuresome structured data, which will be some combination of list, dict, int, and str objects.
def _args_received(self, args):
Undocumented
def _error_received(self, error_args):
Undocumented
def bytes_part_received(self, bytes):
Called when a 'bytes' part is received.

A 'bytes' message part can contain any number of bytes. It should not be confused with a 'byte' part, which is always a single byte.

def end_received(self):
Called when the end of the message is received.
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.