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

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

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

Request.setResponse介绍

暂无

代码示例

代码示例来源:origin: line/armeria

  1. coyoteReq.setResponse(coyoteRes);
  2. coyoteRes.setRequest(coyoteReq);

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

  1. public AbstractProcessor(AbstractEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. asyncStateMachine = new AsyncStateMachine(this);
  4. request = new Request();
  5. response = new Response();
  6. response.setHook(this);
  7. request.setResponse(response);
  8. }

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

  1. public AbstractProcessor(AbstractEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. asyncStateMachine = new AsyncStateMachine<S>(this);
  4. request = new Request();
  5. response = new Response();
  6. response.setHook(this);
  7. request.setResponse(response);
  8. }

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

  1. public AbstractProcessor(AbstractEndpoint<S> endpoint) {
  2. this.endpoint = endpoint;
  3. asyncStateMachine = new AsyncStateMachine<>(this);
  4. request = new Request();
  5. response = new Response();
  6. response.setHook(this);
  7. request.setResponse(response);
  8. }

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

  1. protected AbstractProcessor(Adapter adapter, Request coyoteRequest, Response coyoteResponse) {
  2. this.adapter = adapter;
  3. asyncStateMachine = new AsyncStateMachine(this);
  4. request = coyoteRequest;
  5. response = coyoteResponse;
  6. response.setHook(this);
  7. request.setResponse(response);
  8. request.setHook(this);
  9. userDataHelper = new UserDataHelper(getLog());
  10. }

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

  1. private Request checkRequest(MsgContext ep) {
  2. Request req=ep.getRequest();
  3. if( req==null ) {
  4. req=new Request();
  5. Response res=new Response();
  6. req.setResponse(res);
  7. ep.setRequest( req );
  8. if( registerRequests ) {
  9. synchronized(lock) {
  10. ep.getSource().registerRequest(req, ep, count++);
  11. }
  12. }
  13. }
  14. return req;
  15. }

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

  1. public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. request = new Request();
  4. inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  5. request.setInputBuffer(inputBuffer);
  6. response = new Response();
  7. response.setHook(this);
  8. outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  9. response.setOutputBuffer(outputBuffer);
  10. request.setResponse(response);
  11. initializeFilters();
  12. // Cause loading of HexUtils
  13. int foo = HexUtils.DEC[0];
  14. }

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

  1. /**
  2. * Initialize the stream and the buffer used to parse the request.
  3. */
  4. @Override
  5. public void initialize(){
  6. started = true;
  7. request = new Request();
  8. response = new Response();
  9. response.setHook(this);
  10. inputBuffer = new InternalInputBuffer(request,requestBufferSize);
  11. outputBuffer = new SSLAsyncOutputBuffer(response,maxHttpHeaderSize,
  12. bufferResponse);
  13. request.setInputBuffer(inputBuffer);
  14. response.setOutputBuffer(outputBuffer);
  15. request.setResponse(response);
  16. initializeFilters();
  17. }

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

  1. /**
  2. * Initialize the stream and the buffer used to parse the request.
  3. */
  4. @Override
  5. public void initialize(){
  6. started = true;
  7. request = new Request();
  8. response = new Response();
  9. response.setHook(this);
  10. inputBuffer = new InternalInputBuffer(request,requestBufferSize);
  11. outputBuffer = new InternalOutputBuffer(response,
  12. maxHttpHeaderSize , true);
  13. request.setInputBuffer(inputBuffer);
  14. response.setOutputBuffer(outputBuffer);
  15. request.setResponse(response);
  16. initializeFilters();
  17. }

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

  1. /**
  2. * Initialize the stream and the buffer used to parse the request.
  3. */
  4. @Override
  5. public void initialize(){
  6. started = true;
  7. request = new Request();
  8. response = new Response();
  9. response.setHook(this);
  10. inputBuffer = new InternalInputBuffer(request,requestBufferSize);
  11. outputBuffer = new SSLOutputBuffer(response,maxHttpHeaderSize,
  12. bufferResponse);
  13. request.setInputBuffer(inputBuffer);
  14. response.setOutputBuffer(outputBuffer);
  15. request.setResponse(response);
  16. initializeFilters();
  17. }

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

  1. public Http11Processor(int headerBufferSize, JIoEndpoint endpoint,
  2. int maxTrailerSize) {
  3. this.endpoint = endpoint;
  4. request = new Request();
  5. inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  6. request.setInputBuffer(inputBuffer);
  7. response = new Response();
  8. response.setHook(this);
  9. outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  10. response.setOutputBuffer(outputBuffer);
  11. request.setResponse(response);
  12. initializeFilters(maxTrailerSize);
  13. // Cause loading of HexUtils
  14. HexUtils.load();
  15. }

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

  1. public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. request = new Request();
  4. inputBuffer = new InternalAprInputBuffer(request, headerBufferSize);
  5. request.setInputBuffer(inputBuffer);
  6. response = new Response();
  7. response.setHook(this);
  8. outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize);
  9. response.setOutputBuffer(outputBuffer);
  10. request.setResponse(response);
  11. ssl = endpoint.isSSLEnabled();
  12. initializeFilters();
  13. // Cause loading of HexUtils
  14. int foo = HexUtils.DEC[0];
  15. }

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

  1. public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. request = new Request();
  4. inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  5. request.setInputBuffer(inputBuffer);
  6. response = new Response();
  7. response.setHook(this);
  8. outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  9. response.setOutputBuffer(outputBuffer);
  10. request.setResponse(response);
  11. initializeFilters();
  12. // Cause loading of HexUtils
  13. int foo = HexUtils.DEC[0];
  14. // Cause loading of FastHttpDateFormat
  15. FastHttpDateFormat.getCurrentDate();
  16. }

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

  1. public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. request = new Request();
  4. inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  5. request.setInputBuffer(inputBuffer);
  6. response = new Response();
  7. response.setHook(this);
  8. outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  9. response.setOutputBuffer(outputBuffer);
  10. request.setResponse(response);
  11. initializeFilters();
  12. // Cause loading of HexUtils
  13. int foo = HexUtils.DEC[0];
  14. // Cause loading of FastHttpDateFormat
  15. FastHttpDateFormat.getCurrentDate();
  16. }

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

  1. public Http11NioProcessor(int rxBufSize, int txBufSize, int maxHttpHeaderSize, NioEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. request = new Request();
  4. int readTimeout = endpoint.getSoTimeout();
  5. inputBuffer = new InternalNioInputBuffer(request, maxHttpHeaderSize);
  6. request.setInputBuffer(inputBuffer);
  7. response = new Response();
  8. response.setHook(this);
  9. outputBuffer = new InternalNioOutputBuffer(response, maxHttpHeaderSize);
  10. response.setOutputBuffer(outputBuffer);
  11. request.setResponse(response);
  12. ssl = endpoint.isSSLEnabled();
  13. initializeFilters();
  14. // Cause loading of HexUtils
  15. int foo = HexUtils.DEC[0];
  16. }

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

  1. public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. request = new Request();
  4. inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, endpoint);
  5. request.setInputBuffer(inputBuffer);
  6. if (endpoint.getUseSendfile()) {
  7. request.setSendfile(true);
  8. }
  9. response = new Response();
  10. response.setHook(this);
  11. outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize, endpoint);
  12. response.setOutputBuffer(outputBuffer);
  13. request.setResponse(response);
  14. ssl = endpoint.isSSLEnabled();
  15. initializeFilters();
  16. Http11AbstractProcessor.containerThread.set(Boolean.FALSE);
  17. // Cause loading of HexUtils
  18. int foo = HexUtils.DEC[0];
  19. // Cause loading of FastHttpDateFormat
  20. FastHttpDateFormat.getCurrentDate();
  21. }

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

  1. public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint,
  2. int maxTrailerSize) {
  3. this.endpoint = endpoint;
  4. request = new Request();
  5. inputBuffer = new InternalAprInputBuffer(request, headerBufferSize);
  6. request.setInputBuffer(inputBuffer);
  7. response = new Response();
  8. response.setHook(this);
  9. outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize);
  10. response.setOutputBuffer(outputBuffer);
  11. request.setResponse(response);
  12. ssl = endpoint.isSSLEnabled();
  13. initializeFilters(maxTrailerSize);
  14. // Cause loading of HexUtils
  15. HexUtils.load();
  16. }

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

  1. public Http11NioProcessor(int maxHttpHeaderSize, NioEndpoint endpoint,
  2. int maxTrailerSize) {
  3. this.endpoint = endpoint;
  4. request = new Request();
  5. inputBuffer = new InternalNioInputBuffer(request, maxHttpHeaderSize);
  6. request.setInputBuffer(inputBuffer);
  7. response = new Response();
  8. response.setHook(this);
  9. outputBuffer = new InternalNioOutputBuffer(response, maxHttpHeaderSize);
  10. response.setOutputBuffer(outputBuffer);
  11. request.setResponse(response);
  12. ssl = endpoint.isSSLEnabled();
  13. initializeFilters(maxTrailerSize);
  14. // Cause loading of HexUtils
  15. HexUtils.load();
  16. }

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

  1. public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) {
  2. this.endpoint = endpoint;
  3. request = new Request();
  4. inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, endpoint);
  5. request.setInputBuffer(inputBuffer);
  6. response = new Response();
  7. response.setHook(this);
  8. outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize, endpoint);
  9. response.setOutputBuffer(outputBuffer);
  10. request.setResponse(response);
  11. ssl = endpoint.isSSLEnabled();
  12. initializeFilters();
  13. // Cause loading of HexUtils
  14. int foo = HexUtils.DEC[0];
  15. // Cause loading of FastHttpDateFormat
  16. FastHttpDateFormat.getCurrentDate();
  17. }

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

  1. Stream(Integer identifier, Http2UpgradeHandler handler, Request coyoteRequest) {
  2. super(identifier);
  3. this.handler = handler;
  4. handler.addChild(this);
  5. setWindowSize(handler.getRemoteSettings().getInitialWindowSize());
  6. state = new StreamStateMachine(this);
  7. if (coyoteRequest == null) {
  8. // HTTP/2 new request
  9. this.coyoteRequest = new Request();
  10. this.inputBuffer = new StreamInputBuffer();
  11. this.coyoteRequest.setInputBuffer(inputBuffer);
  12. } else {
  13. // HTTP/1.1 upgrade
  14. this.coyoteRequest = coyoteRequest;
  15. this.inputBuffer = null;
  16. // Headers have been populated by this point
  17. state.receivedStartOfHeaders();
  18. // TODO Assuming the body has been read at this point is not valid
  19. state.receivedEndOfStream();
  20. }
  21. this.coyoteRequest.setSendfile(handler.hasAsyncIO() && handler.getProtocol().getUseSendfile());
  22. this.coyoteResponse.setOutputBuffer(http2OutputBuffer);
  23. this.coyoteRequest.setResponse(coyoteResponse);
  24. this.coyoteRequest.protocol().setString("HTTP/2.0");
  25. if (this.coyoteRequest.getStartTime() < 0) {
  26. this.coyoteRequest.setStartTime(System.currentTimeMillis());
  27. }
  28. }

相关文章

Request类方法