* @throws CommandFailedException thrown if this method cannot complete its task due to errors or failures
*/
public void register (String jobId) throws CommandFailedException {
log.entering ("com.sun.grid.jgrid.server.JCEPHandler", "register");
Job job = (Job)jobMap.get (jobId);
if (job == null) {
log.finer ("Register command failed for job " + jobId + ": No such job");
throw new CommandFailedException (jobId, "No such job");
}
else if (job.getState () == Job.RUNNING) {
job.getLogger ().registerHandler (this);
log.fine ("Connection has been registered with job: " + jobId);
}
else {
log.finer ("Register command failed for job " + jobId + ": Job is not currently running");