org.apache.coyote.Adapter类的使用及代码示例

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

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

Adapter介绍

[英]Adapter. This represents the entry point in a coyote-based servlet container.
[中]适配器。这表示基于coyote的servlet容器中的入口点。

代码示例

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

coyoteAdapter.get().service(coyoteReq, coyoteRes);
final HttpHeaders headers = convertResponse(coyoteRes);
if (res.tryWrite(headers)) {

代码示例来源: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: com.ovea.tajin.server/tajin-server-tomcat7

private ObjectName createObjectName() throws MalformedObjectNameException {
  // Use the same domain as the connector
  domain = adapter.getDomain();
  
  if (domain == null) {
    return null;
  }
  StringBuilder name = new StringBuilder(getDomain());
  name.append(":type=ProtocolHandler,port=");
  name.append(getPort());
  InetAddress address = getAddress();
  if (address != null) {
    name.append(",address=");
    name.append(ObjectName.quote(address.toString()));
  }
  return new ObjectName(name.toString());
}

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

try {
  rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  getAdapter().service(request, response);
} catch (InterruptedIOException e) {
  error = true;
  getAdapter().log(request, response, 0);
  error = true;

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

error = !adapter.event(request, response, status);
} catch (InterruptedIOException e) {
  error = true;
  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: jboss.web/jbossweb

error = !adapter.event(request, response, status);
} catch (InterruptedIOException e) {
  error = true;

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

try {
  rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  error = !getAdapter().asyncDispatch(request, response, status);
  resetTimeouts();
} catch (InterruptedIOException e) {

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

if (!connector.getProtocolHandler().getAdapter().prepare(
    request.getCoyoteRequest(), response.getCoyoteResponse())) {
  return;

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

adapter.log(request, response, 0);
error = true;
adapter.log(request, response, 0);
error = true;
try {
  rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  adapter.service(request, response);
} catch (InterruptedIOException e) {
  error = true;
  adapter.log(request, response, 0);
  error = true;

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

error = !adapter.event(request, response, status);
} catch (InterruptedIOException e) {
  error = true;
  adapter.log(request, response, 0);
  error = true;

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

try {
  rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  error = !adapter.asyncDispatch(request, response, status);
} catch (InterruptedIOException e) {
  error = true;
  adapter.log(request, response, 0);
  error = true;

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

error = !adapter.event(request, response, status);
} catch (InterruptedIOException e) {
  error = true;

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

try {
  rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  error = !getAdapter().asyncDispatch(request, response, status);
  resetTimeouts();
} catch (InterruptedIOException e) {

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

if (!connector.getProtocolHandler().getAdapter().prepare(
    request.getCoyoteRequest(), response.getCoyoteResponse())) {
  return;

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

try {
  rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  getAdapter().service(request, response);
} catch (InterruptedIOException e) {
  setErrorState(ErrorState.CLOSE_NOW, e);
  getAdapter().log(request, response, 0);
  setErrorState(ErrorState.CLOSE_NOW, t);

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

/**
 * Process specified request.
 */
public void process(Request request, ByteChunk input,
          Response response, ByteChunk output)
  throws Exception {
  InputBuffer inputBuffer = new ByteChunkInputBuffer(input);
  OutputBuffer outputBuffer = new ByteChunkOutputBuffer(output);
  request.setInputBuffer(inputBuffer);
  response.setOutputBuffer(outputBuffer);
  adapter.service(request, response);
}

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

error = !getAdapter().event(request, response, status);
} catch (InterruptedIOException e) {
  error = true;
  getAdapter().log(request, response, 0);
  error = true;

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

try {
  rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
  error = !adapter.asyncDispatch(request, response, status);
} catch (InterruptedIOException e) {
  error = true;
    adapter.log(request, response, 0);

代码示例来源: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;
}

相关文章