@Override protected void setCometTimeouts(SocketWrapper<NioChannel> socketWrapper) { // Comet support SelectionKey key = socketWrapper.getSocket().getIOChannel().keyFor( socketWrapper.getSocket().getPoller().getSelector()); if (key != null) { NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment) key.attachment(); if (attach != null) { attach.setComet(comet); if (comet) { Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout"); if (comettimeout != null) { attach.setTimeout(comettimeout.longValue()); } } } } }
@Override protected void setCometTimeouts(SocketWrapper<NioChannel> socketWrapper) { // Comet support SelectionKey key = socketWrapper.getSocket().getIOChannel().keyFor( socketWrapper.getSocket().getPoller().getSelector()); if (key != null) { NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment) key.attachment(); if (attach != null) { attach.setComet(comet); if (comet) { Integer comettimeout = (Integer) request.getAttribute( org.apache.coyote.Constants.COMET_TIMEOUT_ATTR); if (comettimeout != null) { attach.setTimeout(comettimeout.longValue()); } } } } }
@Override protected void setCometTimeouts(SocketWrapper<NioChannel> socketWrapper) { // Comet support SelectionKey key = socketWrapper.getSocket().getIOChannel().keyFor( socketWrapper.getSocket().getPoller().getSelector()); if (key != null) { NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment) key.attachment(); if (attach != null) { attach.setComet(comet); if (comet) { Integer comettimeout = (Integer) request.getAttribute( org.apache.coyote.Constants.COMET_TIMEOUT_ATTR); if (comettimeout != null) { attach.setTimeout(comettimeout.longValue()); } } } } }
if (comet) { Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout"); if (comettimeout != null) attach.setTimeout(comettimeout.longValue());
attach.setTimeout(timeout); } else if (actionCode == ActionCode.ASYNC_COMPLETE) { if (asyncStateMachine.asyncComplete()) { long timeout = ((Long)param).longValue(); attach.setTimeout(timeout); } else if (actionCode == ActionCode.ASYNC_DISPATCH) { if (asyncStateMachine.asyncDispatch()) {
attach.setTimeout(timeout); long timeout = ((Long)param).longValue(); attach.setTimeout(timeout); } else if (actionCode == ActionCode.ASYNC_DISPATCH) { if (asyncStateMachine.asyncDispatch()) {
ka.setTimeout(soTimeout); if (keepAliveTimeout>0) ka.setTimeout(keepAliveTimeout); } else { if (comet) { Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout"); if (comettimeout != null) attach.setTimeout(comettimeout.longValue());
attach.setTimeout(timeout); long timeout = ((Long)param).longValue(); attach.setTimeout(timeout); } else if (actionCode == ActionCode.ASYNC_DISPATCH) { if (asyncStateMachine.asyncDispatch()) {
Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout"); if (comettimeout != null) { attach.setTimeout(comettimeout.longValue()); attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout);
if (comet) { Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout"); if (comettimeout != null) attach.setTimeout(comettimeout.longValue()); } else { if (asyncStateMachine.isAsyncDispatching()) { attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout);
org.apache.coyote.Constants.COMET_TIMEOUT_ATTR); if (comettimeout != null) { attach.setTimeout(comettimeout.longValue()); attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout);
org.apache.coyote.Constants.COMET_TIMEOUT_ATTR); if (comettimeout != null) { attach.setTimeout(comettimeout.longValue()); attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout);
if (comet) { Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout"); if (comettimeout != null) attach.setTimeout(comettimeout.longValue()); } else { attach.setTimeout(endpoint.getSocketProperties().getSoTimeout());
if (comet) { Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout"); if (comettimeout != null) attach.setTimeout(comettimeout.longValue()); } else { attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout);
/** * Send an action to the connector. * * @param actionCode Type of the action * @param param Action parameter */ @Override protected void actionInternal(ActionCode actionCode, Object param) { if (actionCode == ActionCode.ASYNC_COMPLETE) { if (asyncStateMachine.asyncComplete()) { ((NioEndpoint)endpoint).processSocket(this.socket, SocketStatus.OPEN, false); } } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) { if (param == null) return; long timeout = ((Long)param).longValue(); final KeyAttachment ka = (KeyAttachment)socket.getAttachment(false); if (keepAliveTimeout > 0) { ka.setTimeout(timeout); } } else if (actionCode == ActionCode.ASYNC_DISPATCH) { if (asyncStateMachine.asyncDispatch()) { ((NioEndpoint)endpoint).processSocket(this.socket, SocketStatus.OPEN, true); } } }
/** * Send an action to the connector. * * @param actionCode Type of the action * @param param Action parameter */ @Override protected void actionInternal(ActionCode actionCode, Object param) { if (actionCode == ActionCode.ASYNC_COMPLETE) { if (asyncStateMachine.asyncComplete()) { ((NioEndpoint)endpoint).processSocket(this.socket, SocketStatus.OPEN, false); } } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) { if (param == null) return; long timeout = ((Long)param).longValue(); final KeyAttachment ka = (KeyAttachment)socket.getAttachment(false); if (keepAliveTimeout > 0) { ka.setTimeout(timeout); } } else if (actionCode == ActionCode.ASYNC_DISPATCH) { if (asyncStateMachine.asyncDispatch()) { ((NioEndpoint)endpoint).processSocket(this.socket, SocketStatus.OPEN, true); } } }
@Override protected void resetTimeouts() { // The NIO connector uses the timeout configured on the wrapper in the // poller. Therefore, it needs to be reset once asycn processing has // finished. final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(false); if (!error && attach != null && asyncStateMachine.isAsyncDispatching()) { long soTimeout = endpoint.getSoTimeout(); //reset the timeout if (keepAliveTimeout > 0) { attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout); } } }
@Override protected void resetTimeouts() { final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socket.getSocket().getAttachment(false); if (!error && attach != null && asyncStateMachine.isAsyncDispatching()) { long soTimeout = endpoint.getSoTimeout(); //reset the timeout if (keepAlive) { attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout); } } }
@Override protected void resetTimeouts() { final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(false); if (!error && attach != null && asyncStateMachine.isAsyncDispatching()) { long soTimeout = endpoint.getSoTimeout(); //reset the timeout if (keepAlive) { attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout); } } }
@Override protected void resetTimeouts() { final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socket.getSocket().getAttachment(false); if (!error && attach != null && asyncStateMachine.isAsyncDispatching()) { long soTimeout = endpoint.getSoTimeout(); //reset the timeout if (keepAlive) { attach.setTimeout(keepAliveTimeout); } else { attach.setTimeout(soTimeout); } } }