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

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

本文整理了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

  1. @Override
  2. protected boolean handleIncompleteRequestLineRead() {
  3. // This means that no data is available right now
  4. // (long keepalive), so that the processor should be recycled
  5. // and the method should return true
  6. openSocket = true;
  7. if (endpoint.isPaused()) {
  8. // 503 - Service unavailable
  9. response.setStatus(503);
  10. adapter.log(request, response, 0);
  11. error = true;
  12. } else {
  13. return true;
  14. }
  15. return false;
  16. }

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

  1. @Override
  2. protected boolean handleIncompleteRequestLineRead() {
  3. // This means that no data is available right now
  4. // (long keepalive), so that the processor should be recycled
  5. // and the method should return true
  6. openSocket = true;
  7. if (endpoint.isPaused()) {
  8. // 503 - Service unavailable
  9. response.setStatus(503);
  10. adapter.log(request, response, 0);
  11. error = true;
  12. } else {
  13. return true;
  14. }
  15. return false;
  16. }

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

  1. @Override
  2. protected boolean handleIncompleteRequestLineRead() {
  3. // This means that no data is available right now
  4. // (long keepalive), so that the processor should be recycled
  5. // and the method should return true
  6. openSocket = true;
  7. if (endpoint.isPaused()) {
  8. // 503 - Service unavailable
  9. response.setStatus(503);
  10. getAdapter().log(request, response, 0);
  11. error = true;
  12. } else {
  13. return true;
  14. }
  15. return false;
  16. }

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

  1. public void endRequest() {
  2. // Finish the handling of the request
  3. try {
  4. inputBuffer.endRequest();
  5. } catch (IOException e) {
  6. error = true;
  7. } catch (Throwable t) {
  8. log.error(sm.getString("http11processor.request.finish"), t);
  9. // 500 - Internal Server Error
  10. response.setStatus(500);
  11. adapter.log(request, response, 0);
  12. error = true;
  13. }
  14. try {
  15. outputBuffer.endRequest();
  16. } catch (IOException e) {
  17. error = true;
  18. } catch (Throwable t) {
  19. log.error(sm.getString("http11processor.response.finish"), t);
  20. error = true;
  21. }
  22. }

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

  1. public void endRequest() {
  2. // Finish the handling of the request
  3. try {
  4. inputBuffer.endRequest();
  5. } catch (IOException e) {
  6. error = true;
  7. } catch (Throwable t) {
  8. log.error(sm.getString("http11processor.request.finish"), t);
  9. // 500 - Internal Server Error
  10. response.setStatus(500);
  11. adapter.log(request, response, 0);
  12. error = true;
  13. }
  14. try {
  15. outputBuffer.endRequest();
  16. } catch (IOException e) {
  17. error = true;
  18. } catch (Throwable t) {
  19. log.error(sm.getString("http11processor.response.finish"), t);
  20. error = true;
  21. }
  22. }

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

  1. @Override
  2. protected boolean handleIncompleteRequestLineRead() {
  3. // Haven't finished reading the request so keep the socket
  4. // open
  5. openSocket = true;
  6. // Check to see if we have read any of the request line yet
  7. if (inputBuffer.getParsingRequestLinePhase() < 2) {
  8. if (socket.getLastAccess() > -1 || keptAlive) {
  9. // Haven't read the request line and have previously processed a
  10. // request. Must be keep-alive. Make sure poller uses keepAlive.
  11. socket.setTimeout(endpoint.getKeepAliveTimeout());
  12. }
  13. } else {
  14. // Started to read request line. Need to keep processor
  15. // associated with socket
  16. readComplete = false;
  17. // Make sure poller uses soTimeout from here onwards
  18. socket.setTimeout(endpoint.getSoTimeout());
  19. }
  20. if (endpoint.isPaused()) {
  21. // 503 - Service unavailable
  22. response.setStatus(503);
  23. adapter.log(request, response, 0);
  24. error = true;
  25. } else {
  26. return true;
  27. }
  28. return false;
  29. }

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

  1. @Override
  2. protected boolean handleIncompleteRequestLineRead() {
  3. // Haven't finished reading the request so keep the socket
  4. // open
  5. openSocket = true;
  6. // Check to see if we have read any of the request line yet
  7. if (inputBuffer.getParsingRequestLinePhase() < 2) {
  8. if (socket.getLastAccess() > -1 || keptAlive) {
  9. // Haven't read the request line and have previously processed a
  10. // request. Must be keep-alive. Make sure poller uses keepAlive.
  11. socket.setTimeout(endpoint.getKeepAliveTimeout());
  12. }
  13. } else {
  14. // Started to read request line. Need to keep processor
  15. // associated with socket
  16. readComplete = false;
  17. // Make sure poller uses soTimeout from here onwards
  18. socket.setTimeout(endpoint.getSoTimeout());
  19. }
  20. if (endpoint.isPaused()) {
  21. // 503 - Service unavailable
  22. response.setStatus(503);
  23. adapter.log(request, response, 0);
  24. error = true;
  25. } else {
  26. return true;
  27. }
  28. return false;
  29. }

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

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

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

  1. @Override
  2. protected boolean handleIncompleteRequestLineRead() {
  3. // Haven't finished reading the request so keep the socket
  4. // open
  5. openSocket = true;
  6. // Check to see if we have read any of the request line yet
  7. if (((InternalNioInputBuffer)
  8. inputBuffer).getParsingRequestLinePhase() < 2) {
  9. if (socketWrapper.getLastAccess() > -1 || keptAlive) {
  10. // Haven't read the request line and have previously processed a
  11. // request. Must be keep-alive. Make sure poller uses keepAlive.
  12. socketWrapper.setTimeout(endpoint.getKeepAliveTimeout());
  13. }
  14. } else {
  15. // Started to read request line. Need to keep processor
  16. // associated with socket
  17. readComplete = false;
  18. // Make sure poller uses soTimeout from here onwards
  19. socketWrapper.setTimeout(endpoint.getSoTimeout());
  20. }
  21. if (endpoint.isPaused()) {
  22. // 503 - Service unavailable
  23. response.setStatus(503);
  24. getAdapter().log(request, response, 0);
  25. error = true;
  26. } else {
  27. return true;
  28. }
  29. return false;
  30. }

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

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

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

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

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

  1. public SocketState asyncDispatch(SocketStatus status) {
  2. RequestInfo rp = request.getRequestProcessor();
  3. try {
  4. rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  5. error = !adapter.asyncDispatch(request, response, status);
  6. } catch (InterruptedIOException e) {
  7. error = true;
  8. } catch (Throwable t) {
  9. ExceptionUtils.handleThrowable(t);
  10. log.error(sm.getString("http11processor.request.process"), t);
  11. // 500 - Internal Server Error
  12. response.setStatus(500);
  13. adapter.log(request, response, 0);
  14. error = true;
  15. }
  16. rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
  17. if (error) {
  18. recycle();
  19. return SocketState.CLOSED;
  20. } else if (isAsync()) {
  21. return SocketState.LONG;
  22. } else {
  23. recycle();
  24. if (!keepAlive) {
  25. return SocketState.CLOSED;
  26. } else {
  27. return SocketState.OPEN;
  28. }
  29. }
  30. }

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

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

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

  1. public void endRequest() {
  2. // Finish the handling of the request
  3. try {
  4. getInputBuffer().endRequest();
  5. } catch (IOException e) {
  6. error = true;
  7. } catch (Throwable t) {
  8. ExceptionUtils.handleThrowable(t);
  9. getLog().error(sm.getString("http11processor.request.finish"), t);
  10. // 500 - Internal Server Error
  11. response.setStatus(500);
  12. adapter.log(request, response, 0);
  13. error = true;
  14. }
  15. try {
  16. getOutputBuffer().endRequest();
  17. } catch (IOException e) {
  18. error = true;
  19. } catch (Throwable t) {
  20. ExceptionUtils.handleThrowable(t);
  21. getLog().error(sm.getString("http11processor.response.finish"), t);
  22. error = true;
  23. }
  24. }

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

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

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

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

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

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

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

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

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

  1. adapter.log(request, response, 0);

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

  1. adapter.log(request, response, 0);

相关文章