agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/monitors/parsers/DefaultBooleanStatusResponseParser.java
/**
	 * Parses the {@code schedulerResponseText} as a {@link Boolean} value. Truthy values resolve to
	 * {@link DefaultJobStatus#RUNNING} and non-truthy values resolve to {@link DefaultJobStatus#COMPLETED}.
	 *
	 * @param remoteJobId           the remote job id to parse from the response
	 * @param schedulerResponseText the response text from the remote scheduler
	 * @return a {@link JobStatusResponse} containing remote status info about the job with {@code remoteJobId}
	 * @throws RemoteJobMonitorEmptyResponseException   if {@code schedulerResponseText} is blank
	 * @throws RemoteJobMonitorResponseParsingException if {@code schedulerResponseText} could not be parsed
	 */
Parses the  schedulerResponseText as a  Boolean value. Truthy values resolve to
DefaultJobStatus#RUNNING and non-truthy values resolve to  DefaultJobStatus#COMPLETED.


Parses the schedulerResponseText as a Boolean value . Truthy values resolve to DefaultJobStatus#RUNNING and non - truthy values resolve to DefaultJobStatus#COMPLETED .
@Override
	public JobStatusResponse parse(String remoteJobId, String schedulerResponseText) throws RemoteJobMonitorEmptyResponseException, RemoteJobMonitorResponseParsingException {
		if (StringUtils.isBlank(schedulerResponseText)) {
			throw new RemoteJobMonitorEmptyResponseException(
					"Empty response received from job status check on the remote system.");
		} else {
			String exitCode = "0";
			DefaultJobStatus remoteJobStatus = null;
			if (Boolean.parseBoolean(schedulerResponseText)) {
				remoteJobStatus = DefaultJobStatus.RUNNING;
			} else {
				remoteJobStatus = DefaultJobStatus.COMPLETED;
			}
			return new JobStatusResponse<>(remoteJobId, remoteJobStatus, exitCode);
		}
	}
@ Override public JobStatusResponse parse ( String remoteJobId , String schedulerResponseText ) throws RemoteJobMonitorEmptyResponseException , RemoteJobMonitorResponseParsingException { if ( StringUtils . isBlank ( schedulerResponseText ) ) { throw new RemoteJobMonitorEmptyResponseException ( "Empty response received from job status check on the remote system." ) ; } else { String exitCode = "0" ; DefaultJobStatus remoteJobStatus = null ; if ( Boolean . parseBoolean ( schedulerResponseText ) ) { remoteJobStatus = DefaultJobStatus . RUNNING ; } else { remoteJobStatus = DefaultJobStatus . COMPLETED ; } return new JobStatusResponse < > ( remoteJobId , remoteJobStatus , exitCode ) ; } }
Parses the {@code schedulerResponseText} as a {@link Boolean} value.
Parses the { @code schedulerResponseText } as a { @link Boolean } value .