public class HttpChannelOverHttp extends HttpChannel implements HttpParser.RequestHandler, HttpParser.ComplianceHandler
| Constructor and Description |
|---|
HttpChannelOverHttp(HttpConnection httpConnection,
Connector connector,
HttpConfiguration config,
EndPoint endPoint,
HttpTransport transport) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Throwable failure)
If a write or similar operation to this channel fails,
then this method should be called.
|
void |
asyncReadFillInterested() |
void |
badMessage(int status,
String reason) |
boolean |
content(ByteBuffer content) |
boolean |
contentComplete() |
void |
continue100(int available)
If the associated response has the Expect header set to 100 Continue,
then accessing the input stream indicates that the handler/servlet
is ready for the request body and thus a 100 Continue response is sent.
|
void |
earlyEOF() |
int |
getHeaderCacheSize() |
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 |
isExpecting100Continue() |
boolean |
isExpecting102Processing() |
boolean |
messageComplete() |
protected HttpInput |
newHttpInput(HttpChannelState state) |
void |
onComplianceViolation(HttpCompliance compliance,
HttpCompliance required,
String reason) |
void |
parsedHeader(HttpField field) |
void |
recycle() |
boolean |
startRequest(String method,
String uri,
HttpVersion version) |
addRequestLog, commit, execute, getByteBufferPool, getBytesWritten, getCommittedMetaData, getConnector, getEndPoint, getHttpConfiguration, getHttpTransport, getIdleTimeout, getLocalAddress, getNextInterceptor, getRemoteAddress, getRequest, getRequestLog, getRequests, getResponse, getScheduler, getServer, getState, handle, isCommitted, isOptimizedForDirectBuffers, newHttpOutput, onBadMessage, onCompleted, onContent, onContentComplete, onEarlyEOF, onRequest, onRequestComplete, resetBuffer, run, sendResponse, sendResponse, setIdleTimeout, setRequestLog, toString, useDirectBuffers, writepublic HttpChannelOverHttp(HttpConnection httpConnection, Connector connector, HttpConfiguration config, EndPoint endPoint, HttpTransport transport)
protected HttpInput newHttpInput(HttpChannelState state)
newHttpInput in class HttpChannelpublic void recycle()
recycle in class HttpChannelpublic boolean isExpecting100Continue()
isExpecting100Continue in class HttpChannelpublic boolean isExpecting102Processing()
isExpecting102Processing in class HttpChannelpublic boolean startRequest(String method, String uri, HttpVersion version)
startRequest in interface HttpParser.RequestHandlerpublic void parsedHeader(HttpField field)
parsedHeader in interface HttpParser.HttpHandlerpublic void continue100(int available)
throws IOException
continue100 in class HttpChannelavailable - estimate of the number of bytes that are availableIOException - if the InputStream cannot be createdpublic void earlyEOF()
earlyEOF in interface HttpParser.HttpHandlerpublic boolean content(ByteBuffer content)
content in interface HttpParser.HttpHandlerpublic void asyncReadFillInterested()
asyncReadFillInterested in class HttpChannelpublic void badMessage(int status,
String reason)
badMessage in interface HttpParser.HttpHandlerpublic boolean headerComplete()
headerComplete in interface HttpParser.HttpHandlerprotected void handleException(Throwable x)
HttpChannelSends 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 HttpChannelx - the Throwable that caused the problempublic void abort(Throwable failure)
HttpChannel
The standard implementation calls HttpTransport.abort(Throwable).
abort in class HttpChannelfailure - the failure that caused the abort.public boolean contentComplete()
contentComplete in interface HttpParser.HttpHandlerpublic boolean messageComplete()
messageComplete in interface HttpParser.HttpHandlerpublic int getHeaderCacheSize()
getHeaderCacheSize in interface HttpParser.HttpHandlerpublic void onComplianceViolation(HttpCompliance compliance, HttpCompliance required, String reason)
onComplianceViolation in interface HttpParser.ComplianceHandlerCopyright © 1995–2017 Webtide. All rights reserved.