public int closeAll() { Collection<String> ids = cache.getIds(); for (String id : ids) { if (asroot.getName().equals(id)) { continue; // DON'T KILL OUR ROOT SESSION } try { log.info("closeAll called for " + id); cache.removeSession(id); } catch (RemovedSessionException rse) { // Ok. Done for us } catch (SessionTimeoutException ste) { // Also ok } catch (Exception e) { log.warn(String.format("Exception thrown on closeAll: %s:%s", e .getClass().getName(), e.getMessage())); } } return ids.size(); }
public boolean executePasswordCheck(final String name, final String credentials) { if (cache.getIds().contains(credentials)) { return true; } return executeCheckPassword(new Principal(name), credentials); }
public Map<String, Map<String, Object>> getSessionData() { final Collection<String> ids = cache.getIds(); final Map<String, Map<String, Object>> rv = new HashMap<String, Map<String, Object>>(); for (String id : ids) { if (asroot.getName().equals(id)) { continue; // DON'T INCLUDE ROOT SESSION } try { rv.put(id, cache.getSessionData(id, true)); } catch (RemovedSessionException rse) { // Ok. Done for us } catch (SessionTimeoutException ste) { // Also ok } catch (Exception e) { log.warn(String.format("Exception thrown on getAll: %s:%s", e .getClass().getName(), e.getMessage())); } } return rv; }