public static void shutdownManagers() { if (defaultManager != null) defaultManager.shutdown(); for (Iterator i = managers.values().iterator(); i.hasNext(); ) { JRadiusSessionManager manager = (JRadiusSessionManager) i.next(); manager.shutdown(); } }
/** * There is a single JRadiusSessionManager available that is accessible through this method. Using * the default application-wide manager is sufficient for most uses. For specific needs, it is * possible to create a new JRadiusSessionManager object. * * @return the default JRadiusSessionManager instance */ public static JRadiusSessionManager getManager(Object name) { JRadiusSessionManager manager = null; synchronized (managers) { if (name != null) manager = (JRadiusSessionManager) managers.get(name); if (manager == null) { if (defaultManager == null) { defaultManager = new JRadiusSessionManager(); try { defaultManager.afterPropertiesSet(); } catch (Exception e) { e.printStackTrace(); } } manager = defaultManager; } } return manager; }