private void setConcurrentResultAndDispatch(Object result) { synchronized (WebAsyncManager.this) { if (this.concurrentResult != RESULT_NONE) { return; } this.concurrentResult = result; } if (this.asyncWebRequest.isAsyncComplete()) { if (logger.isDebugEnabled()) { logger.debug("Async result set but request already complete: " + formatRequestUri()); } return; } if (logger.isDebugEnabled()) { boolean isError = result instanceof Throwable; logger.debug("Async " + (isError ? "error" : "result set") + ", dispatch to " + formatRequestUri()); } this.asyncWebRequest.dispatch(); }
private void setConcurrentResultAndDispatch(Object result) { synchronized (WebAsyncManager.this) { if (this.concurrentResult != RESULT_NONE) { return; } this.concurrentResult = result; } if (this.asyncWebRequest.isAsyncComplete()) { if (logger.isDebugEnabled()) { logger.debug("Async result set but request already complete: " + formatRequestUri()); } return; } if (logger.isDebugEnabled()) { boolean isError = result instanceof Throwable; logger.debug("Async " + (isError ? "error" : "result set") + ", dispatch to " + formatRequestUri()); } this.asyncWebRequest.dispatch(); }
private void setupDefaultAsyncScenario() { given(this.asyncWebRequest.getNativeRequest(HttpServletRequest.class)).willReturn(this.servletRequest); given(this.asyncWebRequest.isAsyncComplete()).willReturn(false); }
private void setConcurrentResultAndDispatch(Object result) { synchronized (WebAsyncManager.this) { if (this.concurrentResult != RESULT_NONE) { return; } this.concurrentResult = result; } if (this.asyncWebRequest.isAsyncComplete()) { logger.error("Could not complete async processing due to timeout or network error"); return; } if (logger.isDebugEnabled()) { logger.debug("Concurrent result value [" + this.concurrentResult + "] - dispatching request to resume processing"); } this.asyncWebRequest.dispatch(); }
private void setConcurrentResultAndDispatch(Object result) { synchronized (WebAsyncManager.this) { if (this.concurrentResult != RESULT_NONE) { return; } this.concurrentResult = result; } if (this.asyncWebRequest.isAsyncComplete()) { if (logger.isDebugEnabled()) { logger.debug("Async result set but request already complete: " + formatRequestUri()); } return; } if (logger.isDebugEnabled()) { boolean isError = result instanceof Throwable; logger.debug("Async " + (isError ? "error" : "result set") + ", dispatch to " + formatRequestUri()); } this.asyncWebRequest.dispatch(); }