Examples of CometContext


Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

    public void init(ServletConfig sc) throws ServletException {
        super.init(sc);
        atmosphereCtx = sc.getServletContext().getContextPath() + ATMOSPHERE;

        CometEngine cometEngine = CometEngine.getEngine();
        CometContext context = cometEngine.register(atmosphereCtx);
        context.setExpirationDelay(-1);
        logger.debug("Created CometContext for atmosphere context: {}", atmosphereCtx);
    }
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

    /**
     * {@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) {
            logger.debug("Suspending response: {}", res);
            suspend(ctx, action, req, res);
        } else if (action.type == Action.TYPE.RESUME) {
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

     */
    @Override
    public void action(AtmosphereResourceImpl actionEvent) {
        super.action(actionEvent);
        if (actionEvent.action().type == Action.TYPE.RESUME && actionEvent.isInScope()) {
            CometContext ctx = CometEngine.getEngine().getCometContext(atmosphereCtx);
            resume(actionEvent.getRequest(), ctx);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

    public void init(ServletConfig sc) throws ServletException {
        super.init(sc);
        atmosphereCtx = sc.getServletContext().getContextPath() + ATMOSPHERE;

        CometEngine cometEngine = CometEngine.getEngine();
        CometContext context = cometEngine.register(atmosphereCtx);
        context.setExpirationDelay(-1);
        if (logger.isLoggable(Level.FINE)) {
            logger.fine("Created CometContext for " + atmosphereCtx);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

    /**
     * {@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);
            }
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

     */
    @Override
    public void action(AtmosphereResourceImpl actionEvent) {
        super.action(actionEvent);
        if (actionEvent.action().type == Action.TYPE.RESUME && actionEvent.isInScope()) {
            CometContext ctx = CometEngine.getEngine().getCometContext(atmosphereCtx);
            resume(actionEvent.getRequest(), ctx);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

    public void init(ServletConfig sc) throws ServletException {
        super.init(sc);
        atmosphereCtx = sc.getServletContext().getContextPath() + ATMOSPHERE;

        CometEngine cometEngine = CometEngine.getEngine();
        CometContext context = cometEngine.register(atmosphereCtx);
        context.setExpirationDelay(-1);
        logger.debug("Created CometContext for atmosphere context: {}", atmosphereCtx);
    }
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

     * {@inheritDoc}
     */
    @Override
    public Action service(AtmosphereRequest req, AtmosphereResponse res)
            throws IOException, ServletException {
        CometContext ctx = CometEngine.getEngine().getCometContext(atmosphereCtx);
        Action action = suspended(req, res);
        if (action.type() == Action.TYPE.SUSPEND) {
            suspend(ctx, action, req, res);
        } else if (action.type() == Action.TYPE.RESUME) {
            resume(req, ctx);
View Full Code Here

Examples of com.sun.enterprise.web.connector.grizzly.comet.CometContext

            complete(r);
        }
    }

    public AsyncSupport complete(AtmosphereResourceImpl r) {
        CometContext ctx = CometEngine.getEngine().getCometContext(atmosphereCtx);
        resume(r.getRequest(false), ctx);
        return this;
    }
View Full Code Here

Examples of com.sun.grizzly.comet.CometContext

        super.init(sc);

        atmosphereCtx = sc.getServletContext().getContextPath() + ATMOSPHERE;

        CometEngine cometEngine = CometEngine.getEngine();
        CometContext context = cometEngine.register(atmosphereCtx);
        context.setExpirationDelay(-1);
        logger.debug("Created CometContext for atmosphere context: {}", atmosphereCtx);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.