ContextHandler getContextHandler(AsyncContextEvent event) { if (event != null) { Context context = ((Context) event.getServletContext()); if (context != null) return context.getContextHandler(); } return null; }
/* ------------------------------------------------------------ */ public static SecurityHandler getCurrentSecurityHandler() { Context context = ContextHandler.getCurrentContext(); if (context == null) return null; return context.getContextHandler().getChildHandlerByClass(SecurityHandler.class); }