org.apache.catalina.Wrapper.incrementErrorCount()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(93)

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

Wrapper.incrementErrorCount介绍

[英]Increment the error count value used when monitoring.
[中]增加监视时使用的错误计数值。

代码示例

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

private void updateWrapperErrorCount(Request request, Response response) {
  if (response.isError()) {
    Wrapper wrapper = request.getWrapper();
    if (wrapper != null) {
      wrapper.incrementErrorCount();
    }
  }
}

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

private void updateWrapperErrorCount(Request request, Response response) {
  if (response.isError()) {
    Wrapper wrapper = request.getWrapper();
    if (wrapper != null) {
      wrapper.incrementErrorCount();
    }
  }
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public void sendError(int status, String message)
/*      */     throws IOException
/*      */   {
/* 1188 */     if (isCommitted()) {
/* 1189 */       throw new IllegalStateException(sm.getString("coyoteResponse.sendError.ise"));
/*      */     }
/*      */ 
/* 1193 */     if (this.included) {
/* 1194 */       return;
/*      */     }
/* 1196 */     Wrapper wrapper = getRequest().getWrapper();
/* 1197 */     if (wrapper != null) {
/* 1198 */       wrapper.incrementErrorCount();
/*      */     }
/*      */ 
/* 1201 */     setError();
/*      */ 
/* 1203 */     this.coyoteResponse.setStatus(status);
/* 1204 */     this.coyoteResponse.setMessage(message);
/*      */ 
/* 1207 */     resetBuffer();
/*      */ 
/* 1210 */     setSuspended(true);
/*      */   }
/*      */

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

wrapper.incrementErrorCount();

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

/**
 * Send an error response with the specified status and message.
 *
 * @param status HTTP status code to send
 * @param message Corresponding message to send
 *
 * @exception IllegalStateException if this response has
 *  already been committed
 * @exception IOException if an input/output error occurs
 */
public void sendError(int status, String message) 
  throws IOException {
  if (isCommitted())
    throw new IllegalStateException
      (sm.getString("coyoteResponse.sendError.ise"));
  // Ignore any call from an included servlet
  if (included)
    return; 
  Wrapper wrapper = getRequest().getWrapper();
  if (wrapper != null) {
    wrapper.incrementErrorCount();
  } 
  setError();
  coyoteResponse.setStatus(status);
  coyoteResponse.setMessage(message);
  // Clear any data content that has been buffered
  resetBuffer();
  // Cause the response to be finished (from the application perspective)
  setSuspended(true);
}

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

wrapper.incrementErrorCount();

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

/**
 * Send an error response with the specified status and message.
 *
 * @param status HTTP status code to send
 * @param message Corresponding message to send
 *
 * @exception IllegalStateException if this response has
 *  already been committed
 * @exception IOException if an input/output error occurs
 */
public void sendError(int status, String message) 
  throws IOException {
  if (isCommitted())
    throw new IllegalStateException
      (sm.getString("coyoteResponse.sendError.ise"));
  // Ignore any call from an included servlet
  if (included)
    return; 
  Wrapper wrapper = getRequest().getWrapper();
  if (wrapper != null) {
    wrapper.incrementErrorCount();
  } 
  setError();
  coyoteResponse.setStatus(status);
  coyoteResponse.setMessage(message);
  // Clear any data content that has been buffered
  resetBuffer();
  // Cause the response to be finished (from the application perspective)
  setSuspended(true);
}

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

wrapper.incrementErrorCount();

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

wrapper.incrementErrorCount();

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

wrapper.incrementErrorCount();

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

wrapper.incrementErrorCount();

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

/**
 * Send an error response with the specified status and message.
 *
 * @param status HTTP status code to send
 * @param message Corresponding message to send
 *
 * @exception IllegalStateException if this response has
 *  already been committed
 * @exception IOException if an input/output error occurs
 */
public void sendError(int status, String message) 
  throws IOException {
  if (isCommitted())
    throw MESSAGES.cannotSendError();
  // Ignore any call from an included servlet
  if (included)
    return; 
  Wrapper wrapper = getRequest().getWrapper();
  if (wrapper != null) {
    wrapper.incrementErrorCount();
  } 
  setError();
  coyoteResponse.setStatus(status);
  coyoteResponse.setMessage(message);
  // Clear any data content that has been buffered
  resetBuffer();
  // Cause the response to be finished (from the application perspective)
  setSuspended(true);
}

相关文章

微信公众号

最新文章

更多