/** * Gets all logs for a session. * * @param sessionId The id of the session. * @return The logs for the session, ordered after log types in a session logs object. */ @Override public synchronized SessionLogs getAllLogsForSession(SessionId sessionId) { SessionLogs sessionLogs = new SessionLogs(); if (perSessionDriverEntries.containsKey(sessionId)) { Map<String, LogEntries> typeToEntriesMap = perSessionDriverEntries.get(sessionId); for (String logType : typeToEntriesMap.keySet()) { sessionLogs.addLog(logType, typeToEntriesMap.get(logType)); } perSessionDriverEntries.remove(sessionId); } return sessionLogs; }
@Override public Map<String, SessionLogs> handle() throws Exception { ImmutableMap.Builder<String, SessionLogs> builder = ImmutableMap.<String, SessionLogs>builder(); for (SessionId sessionId : LoggingManager.perSessionLogHandler().getLoggedSessions()) { builder.put(sessionId.toString(), LoggingManager.perSessionLogHandler().getAllLogsForSession(sessionId)); } return builder.build(); }
@Override public SessionLogs getAllLogsForSession(SessionId sessionId) { return new SessionLogs(); }
public abstract SessionLogs getAllLogsForSession(SessionId sessionId);