public void event(HttpEvent cometEvent) throws IOException, ServletException { HttpEvent.EventType type = cometEvent.getType(); if (log.isTraceEnabled()) { log.trace("["+Thread.currentThread().getName()+"] Received Comet Event type="+type); } switch (type) { case BEGIN: cometEvent.setTimeout(getTimeout()); break; case READ: checkBayeux(cometEvent); break; case EOF: case EVENT: case WRITE: break; case ERROR: case END: case TIMEOUT: tb.remove(cometEvent); cometEvent.close(); break; } }//event
event.setTimeout((int) action.timeout); } else { event.setTimeout(Integer.MAX_VALUE);
public void event(HttpEvent cometEvent) throws IOException, ServletException { HttpEvent.EventType type = cometEvent.getType(); if (CoyoteLogger.BAYEUX_LOGGER.isTraceEnabled()) { CoyoteLogger.BAYEUX_LOGGER.trace("["+Thread.currentThread().getName()+"] Received Comet Event type="+type); } switch (type) { case BEGIN: cometEvent.setTimeout(getTimeout()); break; case READ: checkBayeux(cometEvent); break; case EOF: case EVENT: case WRITE: break; case ERROR: case END: case TIMEOUT: tb.remove(cometEvent); cometEvent.close(); break; } }//event
log.debug("---addHangingGet: " + request.getSession() + '\n'); synchronized (pushable) { cometEvent.setTimeout((int)comet.getLongPollingTimeout()); pushable.setPushInfo(response);
event.setTimeout(20000);
event.setTimeout(20000);
protected void begin(HttpEvent event) throws IOException, ServletException { boolean close = true; try { // Event timeout isn't supported with APR connectors... if (longPollingTimeoutSupported) { try { event.setTimeout((int)getLongPollingTimeout()); } catch (Exception e) { longPollingTimeoutSupported = false; } } HttpServletRequest request = event.getHttpServletRequest(); CometIO io = createCometIO(); io.readFully(request.getInputStream()); close = handleRequest(event, io.getInputStream()); } finally { if (close) { try { event.close(); } catch (Exception e) { log.debug(e, "Could not close event: %s", EventUtil.toString(event)); } } } }
event.setTimeout(20000);