use of org.codelibs.fess.exception.JobNotFoundException in project fess by codelibs.
the class ProcessHelper method sendCommand.
public void sendCommand(final String sessionId, final String command) {
final JobProcess jobProcess = runningProcessMap.get(sessionId);
if (jobProcess == null) {
throw new JobNotFoundException("Job for " + sessionId + " is not found.");
}
try {
final OutputStream out = jobProcess.getProcess().getOutputStream();
IOUtils.write(command + "\n", out, Constants.CHARSET_UTF_8);
out.flush();
} catch (final IOException e) {
throw new JobProcessingException(e);
}
}
Aggregations