public synchronized JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException { RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID); StandardOutReader stdOutReader = new StandardOutReader(); log.info("Executing RawCommand : " + rawCommandInfo.getCommand()); CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader); String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",jobManagerConfiguration.getBaseMonitorCommand()); JobDescriptor jobDescriptor = new JobDescriptor(); jobManagerConfiguration.getParser().parseSingleJob(jobDescriptor, result); return jobDescriptor; }