private void assignJobs() {
        ServerSideJob job;
        final Collection<Communicator> clients = clientManager.getClients();
        Collection<Communicator> comms;
        while (!jobQueue.isEmpty() && isAnyClientFree(clients)) {
            comms = pickOnlineClients(clients);

            for (Communicator comm : comms) {
                job = pickJob(comm);
                if (job != null) {
                    if (assignJob(job, comm)) {
                        LOG.log(Level.INFO, "Job with ID {0} assigned to client with ID {1}", new Object[]{job.getId(), comm.getTargetId()});
                        synchronized (jobQueue) {
                            jobQueue.remove(job);
                        }
                    } else {
                        LOG.log(Level.WARNING, "Failed to assign job with id {0} to client with ID {1}", new Object[]{job.getId(), comm.getTargetId()});
                    }
                } else {
                    LOG.log(Level.FINE, "No job available for client with ID {0}", comm.getTargetId());
                }
            }
        }
    }