coyoteAdapter.get().service(coyoteReq, coyoteRes); final HttpHeaders headers = convertResponse(coyoteRes); if (res.tryWrite(headers)) {
@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; }
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()); }
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; } } }
error = !adapter.event(request, response, status); } catch (InterruptedIOException e) { error = true;
try { rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE); error = !getAdapter().asyncDispatch(request, response, status); resetTimeouts(); } catch (InterruptedIOException e) {
if (!connector.getProtocolHandler().getAdapter().prepare( request.getCoyoteRequest(), response.getCoyoteResponse())) { return;
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;
error = !adapter.event(request, response, status); } catch (InterruptedIOException e) { error = true;
try { rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE); error = !getAdapter().asyncDispatch(request, response, status); resetTimeouts(); } catch (InterruptedIOException e) {
if (!connector.getProtocolHandler().getAdapter().prepare( request.getCoyoteRequest(), response.getCoyoteResponse())) { return;
/** * 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); }
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);
@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; }