/*
* Register all tasks:
*
- * 1) ...
+ * 1) "Communicator" for crawler->node communication
*/
- //$taskInstance = ObjectFactory::createObjectByConfiguredName('crawler_???_task_class');
- //$handlerInstance->registerTask('crawler_???', $taskInstance);
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('crawler_node_communicator_task_class');
+ $handlerInstance->registerTask('crawler_node_communicator', $taskInstance);
+
+ // 2) Local URL fetcher (fetches URLs locally and adds them to the analyzer's input stack)
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('crawler_local_url_fetcher_task_class');
+ $handlerInstance->registerTask('crawler_local_url_fetcher', $taskInstance);
+
+ // 3) Remote URL fetcher (let fetch URLs by other crawler nodes and also adds them to the stack)
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('crawler_remote_url_fetcher_task_class');
+ $handlerInstance->registerTask('crawler_remote_url_fetcher', $taskInstance);
// Put the task handler in registry
Registry::getRegistry()->addInstance('task_handler', $handlerInstance);