本文整理了Java中org.apache.coyote.Adapter.service()
方法的一些代码示例,展示了Adapter.service()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Adapter.service()
方法的具体详情如下:
包路径:org.apache.coyote.Adapter
类名称:Adapter
方法名:service
[英]Call the service method, and notify all listeners
[中]调用服务方法,并通知所有侦听器
代码示例来源:origin: line/armeria
coyoteAdapter.get().service(coyoteReq, coyoteRes);
final HttpHeaders headers = convertResponse(coyoteRes);
if (res.tryWrite(headers)) {
代码示例来源:origin: org.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: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
/**
* 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: 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: org.glassfish.metro/webservices-extra
/**
* Invoke the <code>Adapter</code>, which usualy invoke the Servlet
* Container.
*/
public void invokeAdapter(){
// Process the request in the adapter
if (!error) {
try {
adapter.service(request, response);
// Handle when the response was committed before a serious
// error occurred. Throwing a ServletException should both
// set the status to 500 and set the errorException.
// If we fail here, then the response is likely already
// committed, so we can't try and set headers.
if(keepAlive && !error) { // Avoid checking twice.
error = response.getErrorException() != null ||
statusDropsConnection(response.getStatus());
}
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
SelectorThread.logger().log(Level.SEVERE,
"processorTask.serviceError", t);
// 500 - Internal Server Error
response.setStatus(500);
error = true;
}
}
}
代码示例来源:origin: jboss.web/jbossweb
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: codefollower/Tomcat-Research
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
getAdapter().service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: org.jboss.web/jbossweb
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
request.getMappingData().recycle();
try {
request.getConnector().getProtocolHandler().getAdapter().service(request.getCoyoteRequest(), response.getCoyoteResponse());
} finally { // local invocations needs it to ensure we don't get a NPE for current service(), used for logAccess()
request.getMappingData().context = oldContext;
代码示例来源:origin: jboss.web/jbossweb
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public final SocketState service(SocketWrapperBase<?> socket) throws IOException {
try {
adapter.service(request, response);
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("streamProcessor.service.error"), e);
}
response.setStatus(500);
setErrorState(ErrorState.CLOSE_NOW, e);
}
if (sendfileState == SendfileState.PENDING) {
return SocketState.SENDFILE;
} else if (getErrorState().isError()) {
action(ActionCode.CLOSE, null);
request.updateCounters();
return SocketState.CLOSED;
} else if (isAsync()) {
return SocketState.LONG;
} else {
action(ActionCode.CLOSE, null);
request.updateCounters();
return SocketState.CLOSED;
}
}
代码示例来源:origin: jboss.web/jbossweb
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源: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);
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
rp.setStage(Constants.STAGE_SERVICE);
try {
adapter.service( req, res );
} catch( Exception ex ) {
log.info("Error servicing request " + req,ex);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: org.jboss.web/jbossweb
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
try {
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
error = true;
内容来源于网络,如有侵权,请联系作者删除!