protected class HttpConnection.HttpChannelOverHttp extends HttpChannel<ByteBuffer>
Constructor and Description |
---|
HttpConnection.HttpChannelOverHttp(Connector connector,
HttpConfiguration config,
EndPoint endPoint,
HttpTransport transport,
HttpInput<ByteBuffer> input) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
If a write or similar to this channel fails this method should be called.
|
void |
badMessage(int status,
String reason) |
boolean |
content(ByteBuffer item) |
void |
earlyEOF() |
protected void |
handleException(Throwable x)
Sends an error 500, performing a special logic to detect whether the request is suspended,
to avoid concurrent writes from the application.
|
boolean |
headerComplete() |
boolean |
messageComplete() |
continue100, execute, getByteBufferPool, getConnector, getCurrentHttpChannel, getEndPoint, getHeaderCacheSize, getHttpConfiguration, getHttpTransport, getHttpVersion, getIdleTimeout, getLocalAddress, getRemoteAddress, getRequest, getRequests, getResponse, getScheduler, getServer, getState, handle, isCommitted, isExpecting100Continue, isExpecting102Processing, parsedHeader, parsedHostHeader, proxied, reset, run, sendResponse, sendResponse, setCurrentHttpChannel, setIdleTimeout, startRequest, toString, useDirectBuffers, write
public HttpConnection.HttpChannelOverHttp(Connector connector, HttpConfiguration config, EndPoint endPoint, HttpTransport transport, HttpInput<ByteBuffer> input)
public void earlyEOF()
earlyEOF
in interface HttpParser.HttpHandler<ByteBuffer>
earlyEOF
in class HttpChannel<ByteBuffer>
public boolean content(ByteBuffer item)
content
in interface HttpParser.HttpHandler<ByteBuffer>
content
in class HttpChannel<ByteBuffer>
public void badMessage(int status, String reason)
badMessage
in interface HttpParser.HttpHandler<ByteBuffer>
badMessage
in class HttpChannel<ByteBuffer>
public boolean headerComplete()
headerComplete
in interface HttpParser.HttpHandler<ByteBuffer>
headerComplete
in class HttpChannel<ByteBuffer>
protected void handleException(Throwable x)
HttpChannel
Sends an error 500, performing a special logic to detect whether the request is suspended, to avoid concurrent writes from the application.
It may happen that the application suspends, and then throws an exception, while an application
spawned thread writes the response content; in such case, we attempt to commit the error directly
bypassing the ErrorHandler
mechanisms and the response OutputStream.
handleException
in class HttpChannel<ByteBuffer>
x
- the Throwable that caused the problempublic void abort()
HttpChannel
HttpTransport.abort()
abort
in class HttpChannel<ByteBuffer>
public boolean messageComplete()
messageComplete
in interface HttpParser.HttpHandler<ByteBuffer>
messageComplete
in class HttpChannel<ByteBuffer>
Copyright © 1995-2015 Webtide. All Rights Reserved.