public List<String> getSessionIds() throws IOException { List<String> res = null; { synchronized (lookupSessionById) { Set<String> keySet = lookupSessionById.keySet(); if (keySet != null) { res = new ArrayList<String>(); res.addAll(keySet); } } } return res; }
public List<Session> getSessions() throws IOException { List<Session> res = null; { synchronized (lookupSessionById) { Collection<AbstractSession> values = lookupSessionById.values(); if (values != null) { res = new ArrayList<Session>(); for (AbstractSession session : values) { expandSession(session); } res.addAll(values); } } } return res; }