- // protected abstract class StreamReaderThread extends Thread {
- // private final InputStream stream;
- //
- // public StreamReaderThread(InputStream stream) {
- // this.stream = stream;
- // }
- //
- // @Override
- // public void run() {
- // BufferedReader in = null;
- // try {
- // in = new BufferedReader(new InputStreamReader(stream));
- // String line = null;
- // while ((line = in.readLine()) != null) {
- // stdOutCallback(line);
- // }
- // } catch (IOException e) {
- // if (log.isTraceEnabled()) {
- // log.trace("Could not read stream", e);
- // // catch silently
- // // because the other methods
- // // to check whether the stream
- // // is closed would probably
- // // be to costly
- // }
- // } finally {
- // if (synchronous)
- // IOUtils.closeQuietly(in);
- // }
- // }
- //
- // protected abstract void callback(String line);
- // }
- //
- // protected class StdInThread extends Thread {
- // private final OutputStream stream;
- //
- // public StdInThread(OutputStream stream) {
- // this.stream = stream;
- // }
- //
- // @Override
- // public void run() {
- // BufferedReader in = null;
- // Writer out = null;
- // try {
- // out = new OutputStreamWriter(stream);
- // in = new BufferedReader(new InputStreamReader(System.in));
- // String line = null;
- // while ((line = in.readLine()) != null) {
- // out.write(line);
- // out.write("\n");
- // out.flush();
- // }
- // } catch (IOException e) {
- // throw new SlcException("Could not write to stdin stream", e);
- // } finally {
- // if (synchronous) {
- // IOUtils.closeQuietly(in);
- // IOUtils.closeQuietly(out);
- // }
- // }
- // }
- //
- // }
+ public void setEnvironmentVariables(Map<String, String> environmentVariables) {
+ this.environmentVariables = environmentVariables;
+ }
+
+ public void setWatchdogTimeout(Long watchdogTimeout) {
+ this.watchdogTimeout = watchdogTimeout;
+ }
+