Package org.opencustomer.webapp.util.listener

Examples of org.opencustomer.webapp.util.listener.SessionMonitor


    private final static Logger log = Logger.getLogger(ListAction.class);

    @Override
    public ActionForward execute(ActionMapping mapping, ListForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        SessionMonitor monitor = (SessionMonitor)request.getSession().getServletContext().getAttribute(Globals.SESSION_MONITOR_KEY);

        if(log.isDebugEnabled())
            log.debug("found "+monitor.getUserSessions().size()+" monitored sessions");
       
        ArrayList<SessionInfoBean> list = new ArrayList<SessionInfoBean>();
        for (HttpSession session : monitor.getUserSessions()) {
            SessionInfoBean bean = new SessionInfoBean();
            bean.setLoginTime(new Date(session.getCreationTime()));
            bean.setLastAccessTime(new Date(session.getLastAccessedTime()));
            bean.setInactiveTime(System.currentTimeMillis() - session.getLastAccessedTime());
            UserVO user = (UserVO) session.getAttribute(Globals.USER_KEY);
View Full Code Here

TOP

Related Classes of org.opencustomer.webapp.util.listener.SessionMonitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.