
com.github.nicosensei.textbatch.job.ResultFileJobController Maven / Gradle / Ivy
/**
*
*/
package com.github.nicosensei.textbatch.job;
import java.io.File;
import com.github.nicosensei.textbatch.Tool;
import com.github.nicosensei.textbatch.ToolException;
/**
* @author ngiraud
*
*/
public abstract class ResultFileJobController<
L extends InputLine,
J extends ResultFileJob>
extends JobController {
@Override
public ResultFileJobProgress getProgress() {
return (ResultFileJobProgress) super.getProgress();
}
@Override
protected void onComplete() throws ToolException {
File resultFile = new File(getProgress().getResultFilePath());
if (resultFile.exists() && resultFile.length() == 0) {
Tool.getInstance().registerFileForCleanup(resultFile);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy