def __init__(self, header_size, handler_function, component_type):
        """
        :param header_size: the size of the message length header in bytes (1,2, or 4)
        :param handler_function: the handler function to execute for each message
        :param component_type: Processor, Sink, or Source
        """
        MessageHandler.__init__(self, handler_function, component_type)
        if not header_size in (1, 2, 4):
            raise RuntimeError('Invalid header_size. Valid values are 1, 2 and 4')
        self.HEADER_SIZE = header_size
        self.FORMAT = HeaderLengthHandler.FORMATS[header_size]
def __init__ ( self , header_size , handler_function , component_type ) : MessageHandler . __init__ ( self , handler_function , component_type ) if not header_size in ( 1 , 2 , 4 ) : raise RuntimeError ( 'Invalid header_size. Valid values are 1, 2 and 4' ) self . HEADER_SIZE = header_size self . FORMAT = HeaderLengthHandler . FORMATS [ header_size ]
:param header_size: the size of the message length header in bytes (1,2, or 4)
        :param handler_function: the handler function to execute for each message
        :param component_type: Processor, Sink, or Source