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

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

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

Request.isFinished介绍

暂无

代码示例

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

  1. /**
  2. * @return <code>true</code> if an attempt has been made to read the request
  3. * body and all of the request body has been read.
  4. */
  5. public boolean isFinished() {
  6. return coyoteRequest.isFinished();
  7. }

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

  1. /**
  2. * Return true if an attempt has been made to read the request body and all
  3. * of the request body has been read
  4. */
  5. public boolean isFinished() {
  6. return coyoteRequest.isFinished();
  7. }

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

  1. /**
  2. * @return <code>true</code> if an attempt has been made to read the request
  3. * body and all of the request body has been read.
  4. */
  5. public boolean isFinished() {
  6. return coyoteRequest.isFinished();
  7. }

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

  1. public boolean isFinished() {
  2. return coyoteRequest.isFinished();
  3. }

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

  1. public boolean isFinished() {
  2. int available = 0;
  3. if (state == BYTE_STATE) {
  4. available = bb.remaining();
  5. } else if (state == CHAR_STATE) {
  6. available = cb.remaining();
  7. }
  8. if (available > 0) {
  9. return false;
  10. } else {
  11. return coyoteRequest.isFinished();
  12. }
  13. }

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

  1. public boolean isFinished() {
  2. int available = 0;
  3. if (state == BYTE_STATE) {
  4. available = bb.remaining();
  5. } else if (state == CHAR_STATE) {
  6. available = cb.remaining();
  7. }
  8. if (available > 0) {
  9. return false;
  10. } else {
  11. return coyoteRequest.isFinished();
  12. }
  13. }

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

  1. public void setReadListener(ReadListener listener) {
  2. coyoteRequest.setReadListener(listener);
  3. // The container is responsible for the first call to
  4. // listener.onDataAvailable(). If isReady() returns true, the container
  5. // needs to call listener.onDataAvailable() from a new thread. If
  6. // isReady() returns false, the socket will be registered for read and
  7. // the container will call listener.onDataAvailable() once data arrives.
  8. // Must call isFinished() first as a call to isReady() if the request
  9. // has been finished will register the socket for read interest and that
  10. // is not required.
  11. if (!coyoteRequest.isFinished() && isReady()) {
  12. coyoteRequest.action(ActionCode.DISPATCH_READ, null);
  13. }
  14. }

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

  1. public void setReadListener(ReadListener listener) {
  2. coyoteRequest.setReadListener(listener);
  3. // The container is responsible for the first call to
  4. // listener.onDataAvailable(). If isReady() returns true, the container
  5. // needs to call listener.onDataAvailable() from a new thread. If
  6. // isReady() returns false, the socket will be registered for read and
  7. // the container will call listener.onDataAvailable() once data arrives.
  8. // Must call isFinished() first as a call to isReady() if the request
  9. // has been finished will register the socket for read interest and that
  10. // is not required.
  11. if (!coyoteRequest.isFinished() && isReady()) {
  12. coyoteRequest.action(ActionCode.DISPATCH_READ, null);
  13. if (!ContainerThreadMarker.isContainerThread()) {
  14. // Not on a container thread so need to execute the dispatch
  15. coyoteRequest.action(ActionCode.DISPATCH_EXECUTE, null);
  16. }
  17. }
  18. }

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

  1. public void setReadListener(ReadListener listener) {
  2. coyoteRequest.setReadListener(listener);
  3. // The container is responsible for the first call to
  4. // listener.onDataAvailable(). If isReady() returns true, the container
  5. // needs to call listener.onDataAvailable() from a new thread. If
  6. // isReady() returns false, the socket will be registered for read and
  7. // the container will call listener.onDataAvailable() once data arrives.
  8. // Must call isFinished() first as a call to isReady() if the request
  9. // has been finished will register the socket for read interest and that
  10. // is not required.
  11. if (!coyoteRequest.isFinished() && isReady()) {
  12. coyoteRequest.action(ActionCode.DISPATCH_READ, null);
  13. if (!ContainerThreadMarker.isContainerThread()) {
  14. // Not on a container thread so need to execute the dispatch
  15. coyoteRequest.action(ActionCode.DISPATCH_EXECUTE, null);
  16. }
  17. }
  18. }

相关文章

Request类方法