public void setStarted(Context context, ServletRequest request, ServletResponse response,
boolean originalRequestResponse) {
synchronized (asyncContextLock) {
this.request.getCoyoteRequest().action(ActionCode.ASYNC_START, this);
this.context = context;
this.servletRequest = request;
this.servletResponse = response;
this.hasOriginalRequestAndResponse = originalRequestResponse;
this.event = new AsyncEvent(this, request, response);
List<AsyncListenerWrapper> listenersCopy = new ArrayList<AsyncListenerWrapper>();
listenersCopy.addAll(listeners);
listeners.clear();
for (AsyncListenerWrapper listener : listenersCopy) {
try {
listener.fireOnStartAsync(event);
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
log.warn("onStartAsync() failed for listener of type [" + listener.getClass().getName() + "]", t);
}
}
}
}
AsyncContextImpl.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:lazycat
作者:
评论列表
文章目录