Package org.mortbay.util.ajax

Examples of org.mortbay.util.ajax.Continuation.resume()


            synchronized (cont) {
                if (log.isDebugEnabled()) {
                    log.debug("Resuming continuation for exchange: " + exchange.getExchangeId());
                }
                exchanges.put(exchange.getExchangeId(), exchange);
                cont.resume();
            }
        } else {
            throw new IllegalStateException("Exchange not found");
        }
    }
View Full Code Here


                logger.debug("Resuming continuation for exchange: " + exchange.getExchangeId());
            }
            // Put the new exchange
            exchanges.put(exchange.getExchangeId(), exchange);
            // Resume continuation
            cont.resume();
            if (!cont.isResumed()) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Could not resume continuation for exchange: " + exchange.getExchangeId());
                }
                exchanges.remove(exchange.getExchangeId());
View Full Code Here

            }
            if (log.isDebugEnabled()) {
                log.debug("Resuming continuation for exchange: " + exchange.getExchangeId());
            }
            exchanges.put(exchange.getExchangeId(), exchange);
            cont.resume();
            if (!cont.isResumed()) {
                if (log.isDebugEnabled()) {
                    log.debug("Could not resume continuation for exchange: " + exchange.getExchangeId());
                }
                exchanges.remove(exchange.getExchangeId());
View Full Code Here

        synchronized (cont) {
            if (logger.isDebugEnabled()) {
                logger.debug("Resuming continuation for exchange: " + exchange.getExchangeId());
            }
            exchanges.put(exchange.getExchangeId(), exchange);
            cont.resume();
        }
    }

    public void process(HttpServletRequest request, HttpServletResponse response) throws Exception {
        if (logger.isDebugEnabled()) {
View Full Code Here

            synchronized (cont) {
                if (log.isDebugEnabled()) {
                    log.debug("Resuming continuation for exchange: " + exchange.getExchangeId());
                }
                exchanges.put(exchange.getExchangeId(), exchange);
                cont.resume();
            }
        } else {
            throw new IllegalStateException("Exchange not found");
        }
    }
View Full Code Here

        synchronized (cont) {
            if (logger.isDebugEnabled()) {
                logger.debug("Resuming continuation for exchange: " + exchange.getExchangeId());
            }
            exchanges.put(exchange.getExchangeId(), exchange);
            cont.resume();
        }
    }

    public void process(HttpServletRequest request, HttpServletResponse response) throws Exception {
        if (logger.isDebugEnabled()) {
View Full Code Here

            synchronized (cont) {
                if (log.isDebugEnabled()) {
                    log.debug("Resuming continuation for exchange: " + exchange.getExchangeId());
                }
                exchanges.put(exchange.getExchangeId(), exchange);
                cont.resume();
            }
        } else {
            throw new IllegalStateException("Exchange not found");
        }
    }
View Full Code Here

                    if (!queue.messagesWaiting()) {

                        queue.setActivationCallback(new QueueActivationCallback() {
                            public void activate(MessageQueue queue) {
                                queue.setActivationCallback(null);
                                cont.resume();
                            }
                        });

                        if (!queue.messagesWaiting()) {
                            cont.suspend(45 * 1000);
 
View Full Code Here

    @Override
    public AsyncSupport complete(AtmosphereResourceImpl r) {
        Continuation c = ContinuationSupport.getContinuation(r.getRequest(false), null);
        if (!c.isNew()) {
            c.resume();
        } else {
            r.getRequest().setAttribute(FrameworkConfig.CANCEL_SUSPEND_OPERATION, true);
        }
        return this;
    }
View Full Code Here

        Action action = super.cancelled(req, res);
        if (req.getAttribute(MAX_INACTIVE) != null && Long.class.cast(req.getAttribute(MAX_INACTIVE)) == -1) {
            Continuation c = ContinuationSupport.getContinuation(req, null);
            if (c != null) {
                c.resume();
            }
        }
        return action;
    }
}
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.