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

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

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

Request.setResponse介绍

暂无

代码示例

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

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

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

public AbstractProcessor(AbstractEndpoint endpoint) {
  this.endpoint = endpoint;
  asyncStateMachine = new AsyncStateMachine(this);
  
  request = new Request();
  response = new Response();
  response.setHook(this);
  request.setResponse(response);
}

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

public AbstractProcessor(AbstractEndpoint endpoint) {
  this.endpoint = endpoint;
  asyncStateMachine = new AsyncStateMachine<S>(this);
  
  request = new Request();
  response = new Response();
  response.setHook(this);
  request.setResponse(response);
}

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

public AbstractProcessor(AbstractEndpoint<S> endpoint) {
  this.endpoint = endpoint;
  asyncStateMachine = new AsyncStateMachine<>(this);
  request = new Request();
  response = new Response();
  response.setHook(this);
  request.setResponse(response);
}

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

protected AbstractProcessor(Adapter adapter, Request coyoteRequest, Response coyoteResponse) {
  this.adapter = adapter;
  asyncStateMachine = new AsyncStateMachine(this);
  request = coyoteRequest;
  response = coyoteResponse;
  response.setHook(this);
  request.setResponse(response);
  request.setHook(this);
  userDataHelper = new UserDataHelper(getLog());
}

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

private Request checkRequest(MsgContext ep) {
  Request req=ep.getRequest();
  if( req==null ) {
    req=new Request();
    Response res=new Response();
    req.setResponse(res);
    ep.setRequest( req );
    if( registerRequests ) {
      synchronized(lock) {
        ep.getSource().registerRequest(req, ep, count++);
      }
    }
  }
  return req;
}

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

public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  initializeFilters();
  // Cause loading of HexUtils
  int foo = HexUtils.DEC[0];
}

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

/**
 * Initialize the stream and the buffer used to parse the request.
 */
@Override
public void initialize(){
  started = true;   
  request = new Request();
  response = new Response();
  response.setHook(this);
  
  inputBuffer = new InternalInputBuffer(request,requestBufferSize); 
  outputBuffer = new SSLAsyncOutputBuffer(response,maxHttpHeaderSize,
                      bufferResponse);
  request.setInputBuffer(inputBuffer);
    response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  initializeFilters();
}

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

/**
 * Initialize the stream and the buffer used to parse the request.
 */
@Override
public void initialize(){
  started = true;   
  request = new Request();
  response = new Response();
  response.setHook(this);
  
  inputBuffer = new InternalInputBuffer(request,requestBufferSize);
  outputBuffer = new InternalOutputBuffer(response,
                      maxHttpHeaderSize , true);
  
  request.setInputBuffer(inputBuffer);
    response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  initializeFilters();
}

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

/**
 * Initialize the stream and the buffer used to parse the request.
 */
@Override
public void initialize(){
  started = true;   
  request = new Request();
  response = new Response();
  response.setHook(this);
  
  inputBuffer = new InternalInputBuffer(request,requestBufferSize); 
  outputBuffer = new SSLOutputBuffer(response,maxHttpHeaderSize,
                    bufferResponse);
  request.setInputBuffer(inputBuffer);
    response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  initializeFilters();
}

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

public Http11Processor(int headerBufferSize, JIoEndpoint endpoint,
    int maxTrailerSize) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  initializeFilters(maxTrailerSize);
  // Cause loading of HexUtils
  HexUtils.load();
}

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

public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalAprInputBuffer(request, headerBufferSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  
  ssl = endpoint.isSSLEnabled();
  initializeFilters();
  // Cause loading of HexUtils
  int foo = HexUtils.DEC[0];
}

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

public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  initializeFilters();
  // Cause loading of HexUtils
  int foo = HexUtils.DEC[0];
  // Cause loading of FastHttpDateFormat
  FastHttpDateFormat.getCurrentDate();
}

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

public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalInputBuffer(request, headerBufferSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  initializeFilters();
  // Cause loading of HexUtils
  int foo = HexUtils.DEC[0];
  // Cause loading of FastHttpDateFormat
  FastHttpDateFormat.getCurrentDate();
}

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

public Http11NioProcessor(int rxBufSize, int txBufSize, int maxHttpHeaderSize, NioEndpoint endpoint) {
  this.endpoint = endpoint;
  request = new Request();
  int readTimeout = endpoint.getSoTimeout();
  inputBuffer = new InternalNioInputBuffer(request, maxHttpHeaderSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalNioOutputBuffer(response, maxHttpHeaderSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  ssl = endpoint.isSSLEnabled();
  initializeFilters();
  // Cause loading of HexUtils
  int foo = HexUtils.DEC[0];
}

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

public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, endpoint);
  request.setInputBuffer(inputBuffer);
  if (endpoint.getUseSendfile()) {
    request.setSendfile(true);
  }
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize, endpoint);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  ssl = endpoint.isSSLEnabled();
  initializeFilters();
  Http11AbstractProcessor.containerThread.set(Boolean.FALSE);
  // Cause loading of HexUtils
  int foo = HexUtils.DEC[0];
  // Cause loading of FastHttpDateFormat
  FastHttpDateFormat.getCurrentDate();
}

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

public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint,
    int maxTrailerSize) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalAprInputBuffer(request, headerBufferSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  
  ssl = endpoint.isSSLEnabled();
  initializeFilters(maxTrailerSize);
  // Cause loading of HexUtils
  HexUtils.load();
}

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

public Http11NioProcessor(int maxHttpHeaderSize, NioEndpoint endpoint,
    int maxTrailerSize) {
  this.endpoint = endpoint;
  request = new Request();
  inputBuffer = new InternalNioInputBuffer(request, maxHttpHeaderSize);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalNioOutputBuffer(response, maxHttpHeaderSize);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  ssl = endpoint.isSSLEnabled();
  initializeFilters(maxTrailerSize);
  // Cause loading of HexUtils
  HexUtils.load();
}

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

public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) {
  this.endpoint = endpoint;
  
  request = new Request();
  inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, endpoint);
  request.setInputBuffer(inputBuffer);
  response = new Response();
  response.setHook(this);
  outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize, endpoint);
  response.setOutputBuffer(outputBuffer);
  request.setResponse(response);
  
  ssl = endpoint.isSSLEnabled();
  initializeFilters();
  // Cause loading of HexUtils
  int foo = HexUtils.DEC[0];
  // Cause loading of FastHttpDateFormat
  FastHttpDateFormat.getCurrentDate();
}

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

Stream(Integer identifier, Http2UpgradeHandler handler, Request coyoteRequest) {
  super(identifier);
  this.handler = handler;
  handler.addChild(this);
  setWindowSize(handler.getRemoteSettings().getInitialWindowSize());
  state = new StreamStateMachine(this);
  if (coyoteRequest == null) {
    // HTTP/2 new request
    this.coyoteRequest = new Request();
    this.inputBuffer = new StreamInputBuffer();
    this.coyoteRequest.setInputBuffer(inputBuffer);
  } else {
    // HTTP/1.1 upgrade
    this.coyoteRequest = coyoteRequest;
    this.inputBuffer = null;
    // Headers have been populated by this point
    state.receivedStartOfHeaders();
    // TODO Assuming the body has been read at this point is not valid
    state.receivedEndOfStream();
  }
  this.coyoteRequest.setSendfile(handler.hasAsyncIO() && handler.getProtocol().getUseSendfile());
  this.coyoteResponse.setOutputBuffer(http2OutputBuffer);
  this.coyoteRequest.setResponse(coyoteResponse);
  this.coyoteRequest.protocol().setString("HTTP/2.0");
  if (this.coyoteRequest.getStartTime() < 0) {
    this.coyoteRequest.setStartTime(System.currentTimeMillis());
  }
}

相关文章

Request类方法