@Override
	public void run(){	

		while (crawlerCTRL.peekInputJob() != null){

			Job job = crawlerCTRL.peekInputJob();
			if (job == null)
				break;			

			Task task = job.pollOutputBus();
			if (task == null){				
				this.waitForever();
				continue;
			}

			Task[] tasks = null;

			String ext = task.getExtension();

			if (ext.equalsIgnoreCase(".html"))
				tasks = parseHTML(task);	
			else if (ext.equalsIgnoreCase(".xml"))
				task = parseXML(task);
			else
				job.toBuffer(task);					


			if (tasks != null)
				for (Task aTask : tasks)
				{
					if (aTask.getType() == AtlasJob.J_CRAWL){
						job.toInputStack(aTask);
						crawlerCTRL.incProgress_Max(1);
					}
					else
						job.toBuffer(aTask);				
				}
			
			if (crawlerCTRL.isPause()){
				crawlerCTRL.pause(this);						
			}	

		}//ENDWHILE		
		crawlerCTRL.killThread(this);
	}