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

x33g5p2x  于2022-01-17 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(102)

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

Adapter.log介绍

暂无

代码示例

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

@Override
protected boolean handleIncompleteRequestLineRead() {
  // This means that no data is available right now
  // (long keepalive), so that the processor should be recycled
  // and the method should return true
  openSocket = true;
  if (endpoint.isPaused()) {
    // 503 - Service unavailable
    response.setStatus(503);
    adapter.log(request, response, 0);
    error = true;
  } else {
    return true;
  }
  return false;
}

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

@Override
protected boolean handleIncompleteRequestLineRead() {
  // This means that no data is available right now
  // (long keepalive), so that the processor should be recycled
  // and the method should return true
  openSocket = true;
  if (endpoint.isPaused()) {
    // 503 - Service unavailable
    response.setStatus(503);
    adapter.log(request, response, 0);
    error = true;
  } else {
    return true;
  }
  return false;
}

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

@Override
protected boolean handleIncompleteRequestLineRead() {
  // This means that no data is available right now
  // (long keepalive), so that the processor should be recycled
  // and the method should return true
  openSocket = true;
  if (endpoint.isPaused()) {
    // 503 - Service unavailable
    response.setStatus(503);
    getAdapter().log(request, response, 0);
    error = true;
  } else {
    return true;
  }
  return false;
}

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

public void endRequest() {
  
  // Finish the handling of the request
  try {
    inputBuffer.endRequest();
  } catch (IOException e) {
    error = true;
  } catch (Throwable t) {
    log.error(sm.getString("http11processor.request.finish"), t);
    // 500 - Internal Server Error
    response.setStatus(500);
    adapter.log(request, response, 0);
    error = true;
  }
  try {
    outputBuffer.endRequest();
  } catch (IOException e) {
    error = true;
  } catch (Throwable t) {
    log.error(sm.getString("http11processor.response.finish"), t);
    error = true;
  }
}

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

public void endRequest() {
  // Finish the handling of the request
  try {
    inputBuffer.endRequest();
  } catch (IOException e) {
    error = true;
  } catch (Throwable t) {
    log.error(sm.getString("http11processor.request.finish"), t);
    // 500 - Internal Server Error
    response.setStatus(500);
    adapter.log(request, response, 0);
    error = true;
  }
  try {
    outputBuffer.endRequest();
  } catch (IOException e) {
    error = true;
  } catch (Throwable t) {
    log.error(sm.getString("http11processor.response.finish"), t);
    error = true;
  }
}

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

@Override
protected boolean handleIncompleteRequestLineRead() {
  // Haven't finished reading the request so keep the socket
  // open
  openSocket = true;
  // Check to see if we have read any of the request line yet
  if (inputBuffer.getParsingRequestLinePhase() < 2) {
    if (socket.getLastAccess() > -1 || keptAlive) {
      // Haven't read the request line and have previously processed a
      // request. Must be keep-alive. Make sure poller uses keepAlive.
      socket.setTimeout(endpoint.getKeepAliveTimeout());
    }
  } else {
    // Started to read request line. Need to keep processor
    // associated with socket
    readComplete = false;
    // Make sure poller uses soTimeout from here onwards
    socket.setTimeout(endpoint.getSoTimeout());
  }
  if (endpoint.isPaused()) {
    // 503 - Service unavailable
    response.setStatus(503);
    adapter.log(request, response, 0);
    error = true;
  } else {
    return true;
  }
  return false;
}

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

@Override
protected boolean handleIncompleteRequestLineRead() {
  // Haven't finished reading the request so keep the socket
  // open
  openSocket = true;
  // Check to see if we have read any of the request line yet
  if (inputBuffer.getParsingRequestLinePhase() < 2) {
    if (socket.getLastAccess() > -1 || keptAlive) {
      // Haven't read the request line and have previously processed a
      // request. Must be keep-alive. Make sure poller uses keepAlive.
      socket.setTimeout(endpoint.getKeepAliveTimeout());
    }
  } else {
    // Started to read request line. Need to keep processor
    // associated with socket
    readComplete = false;
    // Make sure poller uses soTimeout from here onwards
    socket.setTimeout(endpoint.getSoTimeout());
  }
  if (endpoint.isPaused()) {
    // 503 - Service unavailable
    response.setStatus(503);
    adapter.log(request, response, 0);
    error = true;
  } else {
    return true;
  }
  return false;
}

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

getAdapter().log(request, response, 0);
error = true;

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

@Override
protected boolean handleIncompleteRequestLineRead() {
  // Haven't finished reading the request so keep the socket
  // open
  openSocket = true;
  // Check to see if we have read any of the request line yet
  if (((InternalNioInputBuffer)
      inputBuffer).getParsingRequestLinePhase() < 2) {
    if (socketWrapper.getLastAccess() > -1 || keptAlive) {
      // Haven't read the request line and have previously processed a
      // request. Must be keep-alive. Make sure poller uses keepAlive.
      socketWrapper.setTimeout(endpoint.getKeepAliveTimeout());
    }
  } else {
    // Started to read request line. Need to keep processor
    // associated with socket
    readComplete = false;
    // Make sure poller uses soTimeout from here onwards
    socketWrapper.setTimeout(endpoint.getSoTimeout());
  }
  if (endpoint.isPaused()) {
    // 503 - Service unavailable
    response.setStatus(503);
    getAdapter().log(request, response, 0);
    error = true;
  } else {
    return true;
  }
  return false;
}

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

adapter.log(request, response, 0);
error = true;

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

adapter.log(request, response, 0);
error = true;

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

public SocketState asyncDispatch(SocketStatus status) {
  RequestInfo rp = request.getRequestProcessor();
  try {
    rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
    error = !adapter.asyncDispatch(request, response, status);
  } catch (InterruptedIOException e) {
    error = true;
  } catch (Throwable t) {
    ExceptionUtils.handleThrowable(t);
    log.error(sm.getString("http11processor.request.process"), t);
    // 500 - Internal Server Error
    response.setStatus(500);
    adapter.log(request, response, 0);
    error = true;
  }
  rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
  if (error) {
    recycle();
    return SocketState.CLOSED;
  } else if (isAsync()) {
    return SocketState.LONG;
  } else {
    recycle();
    if (!keepAlive) {
      return SocketState.CLOSED;
    } else {
      return SocketState.OPEN;
    }
  }
}

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

getAdapter().log(request, response, 0);
setErrorState(ErrorState.CLOSE_NOW, t);

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

public void endRequest() {
  // Finish the handling of the request
  try {
    getInputBuffer().endRequest();
  } catch (IOException e) {
    error = true;
  } catch (Throwable t) {
    ExceptionUtils.handleThrowable(t);
    getLog().error(sm.getString("http11processor.request.finish"), t);
    // 500 - Internal Server Error
    response.setStatus(500);
    adapter.log(request, response, 0);
    error = true;
  }
  try {
    getOutputBuffer().endRequest();
  } catch (IOException e) {
    error = true;
  } catch (Throwable t) {
    ExceptionUtils.handleThrowable(t);
    getLog().error(sm.getString("http11processor.response.finish"), t);
    error = true;
  }
}

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

getAdapter().log(request, response, 0);
error = true;

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

adapter.log(request, response, 0);
error = true;

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

adapter.log(request, response, 0);
error = true;

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

adapter.log(request, response, 0);
error = true;

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

adapter.log(request, response, 0);

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

adapter.log(request, response, 0);

相关文章