本文整理了Java中org.apache.catalina.connector.Request.isAsync
方法的一些代码示例,展示了Request.isAsync
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.isAsync
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:isAsync
[英]Checks whether async processing has started on this request.
[中]检查此请求是否已启动异步处理。
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
protected void doInternalDispatch() throws ServletException, IOException {
if (log.isDebugEnabled()) {
logDebug("intDispatch");
}
try {
Runnable runnable = dispatch;
dispatch = null;
runnable.run();
if (!request.isAsync()) {
fireOnComplete();
}
} catch (RuntimeException x) {
// doInternalComplete(true);
if (x.getCause() instanceof ServletException) {
throw (ServletException)x.getCause();
}
if (x.getCause() instanceof IOException) {
throw (IOException)x.getCause();
}
throw new ServletException(x);
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
boolean asyncAtStart = request.isAsync();
if (asyncAtStart || context.fireRequestInitEvent(request)) {
if (!(request.isAsync() || (asyncAtStart && request.getAttribute(
RequestDispatcher.ERROR_EXCEPTION) != null))) {
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
if (request.isAsync() && !request.isAsyncCompleting()) {
return;
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
if (!request.isAsync() && !comet) {
response.finishResponse();
req.action(ActionCode.POST_REQUEST , null);
req.getRequestProcessor().setWorkerThreadName(null);
if (!success || (!comet && !request.isAsync())) {
request.recycle();
response.recycle();
代码示例来源:origin: codefollower/Tomcat-Research
boolean asyncAtStart = request.isAsync();
if (!(request.isAsync() || (asyncAtStart &&
request.getAttribute(
RequestDispatcher.ERROR_EXCEPTION) != null))) {
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
if (!request.isAsync() && !comet) {
response.finishResponse();
req.action(ActionCode.POST_REQUEST , null);
req.getRequestProcessor().setWorkerThreadName(null);
if (!success || (!comet && !request.isAsync())) {
request.recycle();
response.recycle();
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
protected void doInternalDispatch() throws ServletException, IOException {
if (log.isDebugEnabled()) {
logDebug("intDispatch");
}
try {
dispatch.run();
if (!request.isAsync()) {
fireOnComplete();
}
} catch (RuntimeException x) {
// doInternalComplete(true);
if (x.getCause() instanceof ServletException) {
throw (ServletException)x.getCause();
}
if (x.getCause() instanceof IOException) {
throw (IOException)x.getCause();
}
throw new ServletException(x);
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
if (request.isAsync() && !request.isAsyncCompleting()) {
return;
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
boolean asyncAtStart = request.isAsync();
if (!request.isAsync() && !asyncAtStart) {
context.fireRequestDestroyEvent(request.getRequest());
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
if (!request.isAsync() && !comet) {
response.finishResponse();
req.action(ActionCode.POST_REQUEST , null);
req.getRequestProcessor().setWorkerThreadName(null);
if (!success || (!comet && !request.isAsync())) {
request.recycle();
response.recycle();
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
protected void doInternalDispatch() throws ServletException, IOException {
if (log.isDebugEnabled()) {
logDebug("intDispatch");
}
try {
dispatch.run();
if (!request.isAsync()) {
fireOnComplete();
}
} catch (RuntimeException x) {
// doInternalComplete(true);
if (x.getCause() instanceof ServletException) {
throw (ServletException)x.getCause();
}
if (x.getCause() instanceof IOException) {
throw (IOException)x.getCause();
}
throw new ServletException(x);
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
request, response);
if (request.isAsync()) {
async = true;
ReadListener readListener = req.getReadListener();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
boolean asyncAtStart = request.isAsync();
if (!request.isAsync() && !asyncAtStart) {
context.fireRequestDestroyEvent(request.getRequest());
代码示例来源:origin: codefollower/Tomcat-Research
protected void doInternalDispatch() throws ServletException, IOException {
if (log.isDebugEnabled()) {
logDebug("intDispatch");
}
try {
Runnable runnable = dispatch;
dispatch = null;
runnable.run();
if (!request.isAsync()) {
fireOnComplete();
}
} catch (RuntimeException x) {
// doInternalComplete(true);
if (x.getCause() instanceof ServletException) {
throw (ServletException)x.getCause();
}
if (x.getCause() instanceof IOException) {
throw (IOException)x.getCause();
}
throw new ServletException(x);
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
protected void doInternalDispatch() throws ServletException, IOException {
if (log.isDebugEnabled()) {
logDebug("intDispatch");
}
try {
Runnable runnable = dispatch;
dispatch = null;
runnable.run();
if (!request.isAsync()) {
fireOnComplete();
}
} catch (RuntimeException x) {
// doInternalComplete(true);
if (x.getCause() instanceof ServletException) {
throw (ServletException)x.getCause();
}
if (x.getCause() instanceof IOException) {
throw (IOException)x.getCause();
}
throw new ServletException(x);
}
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
sendRequestEvent(requestContext, start);
if (!requestContext.getRequest().isAsync()) {
requestContext.destroy();
代码示例来源:origin: org.apache.openejb/tomee-catalina
public void invoke(Request request, Response response) throws IOException, ServletException {
OpenEJBSecurityListener listener = new OpenEJBSecurityListener(securityService, request);
if (!request.isAsync()) {
listener.enter();
try {
getNext().invoke(request, response);
} finally {
listener.exit();
}
} else {
request.getAsyncContext().addListener(new OpenEJBSecurityListener(securityService, request));
getNext().invoke(request, response);
}
}
代码示例来源:origin: org.apache.tomee/tomee-catalina
public void invoke(final Request request, final Response response) throws IOException, ServletException {
final OpenEJBSecurityListener listener = new OpenEJBSecurityListener(securityService, request);
if (!request.isAsync() || request.getAsyncContextInternal() == null) {
listener.enter();
try {
getNext().invoke(request, response);
} finally {
listener.exit();
}
} else {
request.getAsyncContextInternal().addListener(new OpenEJBSecurityListener(securityService, request));
// finally continue the invocation
getNext().invoke(request, response);
}
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
private void sendRequestEvent(RequestContext requestContext, long start) {
final MetricsService metricsService = SystemInstance.get().getComponent(MetricsService.class);
if (metricsService != null && metricsService.isActive()) {
if(!requestContext.isDestroyed()){
final RequestEvent event = new RequestEvent();
event.setSubCategory("http");
event.setRequest(event.getSubCategory());
SystemInstance.get().fireEvent(event);
if (!requestContext.getRequest().isAsync()) {
event.setElapsedTimeNano(System.nanoTime() - start);
SystemInstance.get().fireEvent(new RequestComplete(new TribestreamRequestData(requestContext)));
}
// else see proxy processor cause it will be done in an asynchronous manner in the NIO listener
// SystemInstance.get().fireEvent(new RequestComplete(new TribestreamRequestData(requestContext), new ProxyData(requestContext)));
}
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
if (!request.isAsync()) {
内容来源于网络,如有侵权,请联系作者删除!