class AdminConsoleController {

    @RequestMapping("/")
    public ModelAndView index(HttpSession session) throws XMPPException {
        ExtendedXMPPConnection client = (ExtendedXMPPConnection) session.getAttribute(SESSION_ATTRIBUTE);
        if (client == null) {
            // login
            return login();
        } else if (!client.isConnected()) {
            return login("Disconnected from XMPP server, please log in again");
        } else {
            ModelAndView mav = new ModelAndView("index");
            mav.addObject(MODEL_AUTHENTICATED, getUserName(client));
            return mav;
        }
    }

    @Autowired public  AdminConsoleController(XMPPTCPConnectionConfiguration connectionConfiguration);

}