org.apache.coyote.Response.getErrorException()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中org.apache.coyote.Response.getErrorException方法的一些代码示例,展示了Response.getErrorException的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getErrorException方法的具体详情如下:
包路径:org.apache.coyote.Response
类名称:Response
方法名:getErrorException

Response.getErrorException介绍

[英]Get the Exception that occurred during request processing.
[中]获取请求处理期间发生的异常。

代码示例

代码示例来源:origin: org.glassfish.metro/webservices-extra

/**
 * Invoke the <code>Adapter</code>, which usualy invoke the Servlet
 * Container.
 */
public void invokeAdapter(){
  // Process the request in the adapter
  if (!error) {
    try {
      adapter.service(request, response);
      // Handle when the response was committed before a serious
      // error occurred.  Throwing a ServletException should both
      // set the status to 500 and set the errorException.
      // If we fail here, then the response is likely already 
      // committed, so we can't try and set headers.
      if(keepAlive && !error) { // Avoid checking twice.
        error = response.getErrorException() != null ||
            statusDropsConnection(response.getStatus());
      }
    } catch (InterruptedIOException e) {
      error = true;
    } catch (Throwable t) {
      SelectorThread.logger().log(Level.SEVERE,
          "processorTask.serviceError", t);
      // 500 - Internal Server Error
      response.setStatus(500);
      error = true;
    }
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

throw new ClientAbortException(coyoteResponse.getErrorException());

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

throw new ClientAbortException(coyoteResponse.getErrorException());

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Flush bytes or chars contained in the buffer.
 * 
 * @throws IOException An underlying IOException occurred
 */
protected void doFlush(boolean realFlush)
  throws IOException {
  if (suspended)
    return;
  doFlush = true;
  if (initial) {
    coyoteResponse.sendHeaders();
    initial = false;
  }
  if (bb.getLength() > 0) {
    bb.flushBuffer();
  }
  doFlush = false;
  if (realFlush) {
    coyoteResponse.action(ActionCode.CLIENT_FLUSH, 
               coyoteResponse);
    // If some exception occurred earlier, or if some IOE occurred
    // here, notify the servlet with an IOE
    if (coyoteResponse.isExceptionPresent()) {
      throw new ClientAbortException
        (coyoteResponse.getErrorException());
    }
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Flush bytes or chars contained in the buffer.
 * 
 * @throws IOException An underlying IOException occurred
 */
protected void doFlush(boolean realFlush)
  throws IOException {
  if (suspended)
    return;
  doFlush = true;
  if (initial) {
    coyoteResponse.sendHeaders();
    initial = false;
  }
  if (bb.getLength() > 0) {
    bb.flushBuffer();
  }
  doFlush = false;
  if (realFlush) {
    coyoteResponse.action(ActionCode.CLIENT_FLUSH, 
               coyoteResponse);
    // If some exception occurred earlier, or if some IOE occurred
    // here, notify the servlet with an IOE
    if (coyoteResponse.isExceptionPresent()) {
      throw new ClientAbortException
        (coyoteResponse.getErrorException());
    }
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Flush bytes or chars contained in the buffer.
 * 
 * @throws IOException An underlying IOException occurred
 */
protected void doFlush(boolean realFlush)
  throws IOException {
  if (suspended)
    return;
  doFlush = true;
  if (initial) {
    coyoteResponse.sendHeaders();
    initial = false;
  }
  if (bb.getLength() > 0) {
    bb.flushBuffer();
  }
  doFlush = false;
  if (realFlush) {
    coyoteResponse.action(ActionCode.CLIENT_FLUSH, 
               coyoteResponse);
    // If some exception occurred earlier, or if some IOE occurred
    // here, notify the servlet with an IOE
    if (coyoteResponse.isExceptionPresent()) {
      throw new ClientAbortException
        (coyoteResponse.getErrorException());
    }
  }
}

代码示例来源:origin: tomcat/catalina

(coyoteResponse.getErrorException());

代码示例来源:origin: jboss.web/jbossweb

(coyoteResponse.getErrorException());

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

(coyoteResponse.getErrorException());

代码示例来源:origin: jboss.remoting/jboss-remoting

(coyoteResponse.getErrorException());

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

(coyoteResponse.getErrorException());

代码示例来源:origin: org.jboss.web/jbossweb

(coyoteResponse.getErrorException());

代码示例来源:origin: codefollower/Tomcat-Research

(coyoteResponse.getErrorException());

代码示例来源:origin: jboss.web/jbossweb

error = response.getErrorException() != null ||
    statusDropsConnection(response.getStatus());

代码示例来源:origin: org.jboss.web/jbossweb

error = response.getErrorException() != null ||
    statusDropsConnection(response.getStatus());

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

error = response.getErrorException() != null ||
    statusDropsConnection(response.getStatus());

代码示例来源:origin: jboss.web/jbossweb

error = response.getErrorException() != null ||
    statusDropsConnection(response.getStatus());

代码示例来源:origin: org.jboss.web/jbossweb

error = response.getErrorException() != null ||
    statusDropsConnection(response.getStatus());

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

error = response.getErrorException() != null ||
    statusDropsConnection(response.getStatus());

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

error = response.getErrorException() != null ||
    statusDropsConnection(response.getStatus());

相关文章

微信公众号

最新文章

更多