private void log(String text) { trialOutput.log("socket", text); } }
@Override public Void call() throws IOException, InterruptedException, ParseException { LineReader lineReader = new LineReader(reader); boolean threw = true; try { String line; while ((line = lineReader.readLine()) != null) { trialOutput.log(streamName, line); LogMessage logMessage = logMessageParser.parse(line); if (logMessage != null) { outputQueue.put(new StreamItem(logMessage)); } } threw = false; } catch (Exception e) { notifyFailed(e); } finally { closeReadStream(); Closeables.close(reader, threw); } return null; } }