*/
public static List<SessionOutput> getOutput(Connection con, Long sessionId) {
List<SessionOutput> outputList = new ArrayList<SessionOutput>();
UserSessionsOutput userSessionsOutput = userSessionsOutputMap.get(sessionId);
if (userSessionsOutput != null) {
for (Long key : userSessionsOutput.getSessionOutputMap().keySet()) {
//get output chars and set to output
try {
StringBuilder sb = userSessionsOutput.getSessionOutputMap().get(key);
if (sb != null) {
SessionOutput sessionOutput = new SessionOutput();
sessionOutput.setSessionId(sessionId);
sessionOutput.setHostSystemId(key);
sessionOutput.setOutput(sb.toString());
if (StringUtils.isNotEmpty(sessionOutput.getOutput())) {
outputList.add(sessionOutput);
if ("true".equals(enableAudit)) {
SessionAuditDB.insertTerminalLog(con, sessionOutput);
}
userSessionsOutput.getSessionOutputMap().put(key, new StringBuilder());
}
}
} catch (Exception ex) {
ex.printStackTrace();
}