public Set<DataHandler> lookupClientHandlers(String channelId) { final CometContext context = CometEngine.getEngine().getCometContext(channel); if (context != null) { return context.getCometHandlers(); } return Collections.EMPTY_SET; }
CometContext context = CometEngine.getEngine().getCometContext(topic); if (context == null) { context = createCometContext(topic);
/** * {@inheritDoc} */ public Action service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { CometContext ctx = CometEngine.getEngine().getCometContext(atmosphereCtx); Action action = suspended(req, res); if (action.type == Action.TYPE.SUSPEND) { if (logger.isLoggable(Level.FINE)){ logger.fine("Suspending" + res); } suspend(ctx, action, req, res); } else if (action.type == Action.TYPE.RESUME){ if (logger.isLoggable(Level.FINE)){ logger.fine("Resuming" + res); } resume(req,ctx); Action nextAction = resumed(req, res); if (nextAction.type == Action.TYPE.SUSPEND) { if (logger.isLoggable(Level.FINE)){ logger.fine("Suspending after Resuming" + res); } suspend(ctx, action, req, res); } } return action; }
/** * {@inheritDoc} */ public void action(AtmosphereEventImpl actionEvent){ if (actionEvent.action().type == Action.TYPE.RESUME){ CometContext ctx = CometEngine.getEngine().getCometContext(atmosphereCtx); resume(actionEvent.getRequest(), ctx); } }
CometContext context = CometEngine.getEngine().getCometContext(topic); if (context == null && suspendOnTheFly) { context = createCometContext(topic);