public class HttpChannelOverHttp extends HttpChannel
HttpChannel.Listener| Constructor and Description |
|---|
HttpChannelOverHttp(HttpConnection httpConnection,
Connector connector,
HttpConfiguration config,
EndPoint endPoint,
HttpTransport transport) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(java.lang.Throwable failure)
If a write or similar operation to this channel fails,
then this method should be called.
|
void |
badMessage(BadMessageException failure) |
boolean |
content(java.nio.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(java.lang.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 |
onAsyncWaitForContent() |
void |
onBlockWaitForContent() |
void |
onBlockWaitForContentFailure(java.lang.Throwable failure) |
void |
onComplianceViolation(HttpCompliance compliance,
HttpComplianceSection violation,
java.lang.String reason) |
void |
parsedHeader(HttpField field) |
void |
parsedTrailer(HttpField field) |
void |
recycle() |
boolean |
startRequest(java.lang.String method,
java.lang.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, onTrailers, resetBuffer, run, sendError, 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(java.lang.String method,
java.lang.String uri,
HttpVersion version)
public void parsedHeader(HttpField field)
public void parsedTrailer(HttpField field)
public void continue100(int available)
throws java.io.IOException
continue100 in class HttpChannelavailable - estimate of the number of bytes that are availablejava.io.IOException - if the InputStream cannot be createdpublic void earlyEOF()
public boolean content(java.nio.ByteBuffer content)
public void onAsyncWaitForContent()
onAsyncWaitForContent in class HttpChannelpublic void onBlockWaitForContent()
onBlockWaitForContent in class HttpChannelpublic void onBlockWaitForContentFailure(java.lang.Throwable failure)
onBlockWaitForContentFailure in class HttpChannelpublic void badMessage(BadMessageException failure)
public boolean headerComplete()
protected void handleException(java.lang.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(java.lang.Throwable failure)
HttpChannel
The standard implementation calls HttpTransport.abort(Throwable).
abort in class HttpChannelfailure - the failure that caused the abort.public boolean contentComplete()
public boolean messageComplete()
public int getHeaderCacheSize()
public void onComplianceViolation(HttpCompliance compliance,
HttpComplianceSection violation,
java.lang.String reason)