@Override
    public void run() {
    	ServerSocket server = null;
    	try {
    		server = new ServerSocket(jobTracker.getClientCommPort());
    		
    		Socket clientSocket;
    		
    		while(true) {
	    		clientSocket = server.accept();
	    		ObjectInputStream ois = new ObjectInputStream(clientSocket.getInputStream());
				
				Job job = (Job)ois.readObject();
				
				if(job.getId() == -1) {
					job.setId(JobTracker.getNextJobId());
					setUpJob(job);
				}
				
				JobStatus status = jobTracker.getStatus().get(job.getId());
				
				JobProgress progress = new JobProgress(job.getId());

				//TODO: set this properly
				progress.setPercentMapTaskFinished(0);
				progress.setPercentReduceTaskFinished(0);
				progress.setState(status.getJobState());
				progress.setMessage(status.getMessage());
				
				ObjectOutputStream oos = new ObjectOutputStream(clientSocket.getOutputStream());
				oos.writeObject(progress);
				
				oos.flush();
				
				ois.close();
				oos.close();
				clientSocket.close();
    		}
    	} catch (Exception e) {
    		e.printStackTrace();
    	} finally {
    		try {
    			if(server != null) {
    				server.close();
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    	}
    	
    	
    }