public class HttpChannelOverHTTP2 extends HttpChannel implements java.io.Closeable, WriteFlusher.Listener
HttpChannel.Listener| Constructor and Description |
|---|
HttpChannelOverHTTP2(Connector connector,
HttpConfiguration configuration,
EndPoint endPoint,
HttpTransportOverHTTP2 transport) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
commit(MetaData.Response info) |
protected void |
consumeInput() |
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.
|
HttpTransportOverHTTP2 |
getHttpTransport() |
long |
getIdleTimeout()
Get the idle timeout.
|
protected IStream |
getStream() |
boolean |
isExpecting100Continue() |
boolean |
isRequestIdle() |
java.lang.Runnable |
onFailure(java.lang.Throwable failure,
Callback callback) |
void |
onFlushed(long bytes)
Invoked when a
WriteFlusher flushed bytes in a non-blocking way,
as part of a - possibly larger - write. |
java.lang.Runnable |
onPushRequest(MetaData.Request request) |
java.lang.Runnable |
onRequest(HeadersFrame frame) |
java.lang.Runnable |
onRequestContent(DataFrame frame,
Callback callback) |
java.lang.Runnable |
onRequestTrailers(HeadersFrame frame) |
boolean |
onStreamTimeout(java.lang.Throwable failure,
java.util.function.Consumer<java.lang.Runnable> consumer) |
void |
recycle() |
void |
setIdleTimeout(long timeoutMs)
Set the idle timeout.
|
java.lang.String |
toString() |
abort, addListener, addRequestLog, execute, getByteBufferPool, getBytesWritten, getCommittedMetaData, getConnection, getConnector, getEndPoint, getHttpConfiguration, getLocalAddress, getNextInterceptor, getRemoteAddress, getRequest, getRequestLog, getRequests, getResponse, getScheduler, getServer, getState, handle, handleException, isCommitted, isExpecting102Processing, isOptimizedForDirectBuffers, isPersistent, isRequestCompleted, isResponseCompleted, newHttpInput, newHttpOutput, onAsyncWaitForContent, onBadMessage, onBlockWaitForContent, onBlockWaitForContentFailure, onCompleted, onContent, onContentComplete, onEarlyEOF, onRequest, onRequestComplete, onTrailers, removeListener, resetBuffer, run, sendError, sendResponse, sendResponse, setRequestLog, unwrap, useDirectBuffers, writepublic HttpChannelOverHTTP2(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransportOverHTTP2 transport)
protected IStream getStream()
public boolean isExpecting100Continue()
isExpecting100Continue in class HttpChannelpublic void setIdleTimeout(long timeoutMs)
HttpChannelThis is implemented as a call to EndPoint.setIdleTimeout(long), but may be
overridden by channels that have timeouts different from their connections.
setIdleTimeout in class HttpChanneltimeoutMs - the idle timeout in millisecondspublic long getIdleTimeout()
HttpChannelThis is implemented as a call to EndPoint.getIdleTimeout(), but may be
overridden by channels that have timeouts different from their connections.
getIdleTimeout in class HttpChannelpublic void onFlushed(long bytes)
throws java.io.IOException
WriteFlusher.ListenerInvoked when a WriteFlusher flushed bytes in a non-blocking way,
as part of a - possibly larger - write.
This method may be invoked multiple times, for example when writing a large buffer: a first flush of bytes, then the connection became TCP congested, and a subsequent flush of bytes when the connection became writable again.
This method is never invoked concurrently, but may be invoked by different threads, so implementations may not rely on thread-local variables.
Implementations may throw an IOException to signal that the write
should fail, for example if the implementation enforces a minimum data rate.
onFlushed in interface WriteFlusher.Listenerbytes - the number of bytes flushedjava.io.IOException - if the write should failpublic java.lang.Runnable onRequest(HeadersFrame frame)
public java.lang.Runnable onPushRequest(MetaData.Request request)
public HttpTransportOverHTTP2 getHttpTransport()
getHttpTransport in class HttpChannelpublic void recycle()
recycle in class HttpChannelprotected void commit(MetaData.Response info)
commit in class HttpChannelpublic java.lang.Runnable onRequestTrailers(HeadersFrame frame)
public boolean isRequestIdle()
public boolean onStreamTimeout(java.lang.Throwable failure,
java.util.function.Consumer<java.lang.Runnable> consumer)
public java.lang.Runnable onFailure(java.lang.Throwable failure,
Callback callback)
protected void consumeInput()
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 close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic java.lang.String toString()
toString in class HttpChannelCopyright © 1995–2023 Webtide. All rights reserved.