/** * Set connection timeout. */ public void setTimeout(int timeout) { coyoteRequest.action(ActionCode.ACTION_EVENT_TIMEOUT, timeout); } public void setTimeout0(int timeout) {
public boolean isAsyncCompleting() { if (asyncContext == null) { return false; } AtomicBoolean result = new AtomicBoolean(false); coyoteRequest.action(ActionCode.ASYNC_IS_COMPLETING, result); return result.get(); }
public boolean isAsyncDispatching() { if (asyncContext == null) { return false; } AtomicBoolean result = new AtomicBoolean(false); coyoteRequest.action(ActionCode.ASYNC_IS_DISPATCHING, result); return result.get(); }
public boolean isAsync() { if (asyncContext == null) { return false; } AtomicBoolean result = new AtomicBoolean(false); coyoteRequest.action(ActionCode.ASYNC_IS_ASYNC, result); return result.get(); }
public boolean isTrailerFieldsReady() { AtomicBoolean result = new AtomicBoolean(false); action(ActionCode.IS_TRAILER_FIELDS_READY, result); return result.get(); }
public boolean isStarted() { AtomicBoolean result = new AtomicBoolean(false); request.getCoyoteRequest().action( ActionCode.ASYNC_IS_STARTED, result); return result.get(); }
public PushBuilder newPushBuilder(HttpServletRequest request) { AtomicBoolean result = new AtomicBoolean(); coyoteRequest.action(ActionCode.IS_PUSH_SUPPORTED, result); if (result.get()) { return new ApplicationPushBuilder(this, request); } else { return null; } }
/** * Returns the Internet Protocol (IP) source port of the client * or last proxy that sent the request. */ public int getRemotePort(){ if (remotePort == -1) { coyoteRequest.action (ActionCode.ACTION_REQ_REMOTEPORT_ATTRIBUTE, coyoteRequest); remotePort = coyoteRequest.getRemotePort(); } return remotePort; }
/** * Returns the Internet Protocol (IP) source port of the client * or last proxy that sent the request. */ public int getRemotePort(){ if (remotePort == -1) { coyoteRequest.action (ActionCode.ACTION_REQ_REMOTEPORT_ATTRIBUTE, coyoteRequest); remotePort = coyoteRequest.getRemotePort(); } return remotePort; }
@Override public void setTimeout(long timeout) { check(); this.timeout = timeout; request.getCoyoteRequest().action(ActionCode.ASYNC_SETTIMEOUT, Long.valueOf(timeout)); }
/** * @return the remote IP address making this Request. */ @Override public String getRemoteAddr() { if (remoteAddr == null) { coyoteRequest.action (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest); remoteAddr = coyoteRequest.remoteAddr().toString(); } return remoteAddr; }
/** * Check the configuration for aborted uploads and if configured to do so, * disable the swallowing of any remaining input and close the connection * once the response has been written. */ protected void checkSwallowInput() { Context context = getContext(); if (context != null && !context.getSwallowAbortedUploads()) { coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null); } }
/** * Return the remote IP address making this Request. */ @Override public String getRemoteAddr() { if (remoteAddr == null) { coyoteRequest.action (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest); remoteAddr = coyoteRequest.remoteAddr().toString(); } return remoteAddr; }
/** * @return the remote IP address making this Request. */ @Override public String getRemoteAddr() { if (remoteAddr == null) { coyoteRequest.action (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest); remoteAddr = coyoteRequest.remoteAddr().toString(); } return remoteAddr; }
@Override public void run() { request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCHED, null); try { applicationDispatcher.dispatch(servletRequest, servletResponse); } catch (Exception e) { throw new RuntimeException(sm.getString("asyncContextImpl.asyncDispachError"), e); } }
public int available() { int available = availableInThisBuffer(); if (available == 0) { coyoteRequest.action(ActionCode.AVAILABLE, Boolean.valueOf(coyoteRequest.getReadListener() != null)); available = (coyoteRequest.getAvailable() > 0) ? 1 : 0; } return available; }
@Override public void complete() { if (log.isDebugEnabled()) { logDebug("complete "); } check(); request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null); }
@Override public void complete() { if (log.isDebugEnabled()) { logDebug("complete "); } check(); request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null); }
@Override public void start(final Runnable run) { if (log.isDebugEnabled()) { logDebug("start "); } check(); Runnable wrapper = new RunnableWrapper(run, context, this.request.getCoyoteRequest()); this.request.getCoyoteRequest().action(ActionCode.ASYNC_RUN, wrapper); }
@Override public void start(final Runnable run) { if (log.isDebugEnabled()) { logDebug("start "); } check(); Runnable wrapper = new RunnableWrapper(run, context, this.request.getCoyoteRequest()); this.request.getCoyoteRequest().action(ActionCode.ASYNC_RUN, wrapper); }