Class HttpChannelOverHTTP3
java.lang.Object
org.eclipse.jetty.server.HttpChannel
org.eclipse.jetty.http3.server.internal.HttpChannelOverHTTP3
- All Implemented Interfaces:
Runnable
,HttpOutput.Interceptor
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.server.HttpChannel
HttpChannel.Listener, HttpChannel.TransientListeners
-
Field Summary
Fields inherited from class org.eclipse.jetty.server.HttpChannel
NOOP_LISTENER
-
Constructor Summary
ConstructorsConstructorDescriptionHttpChannelOverHTTP3
(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransportOverHTTP3 transport, HTTP3Stream stream, ServerHTTP3StreamConnection connection) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
commit
(MetaData.Response info) 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.protected boolean
eof()
Mark the channel's input as EOF.boolean
failAllContent
(Throwable failure) Fail all content that is currently stored within the channel.boolean
Fail the channel's input.boolean
boolean
Notify the channel that content is needed.boolean
onIdleTimeout
(Throwable failure, Consumer<Runnable> consumer) onRequest
(HeadersFrame frame) onTrailer
(HeadersFrame frame) Produce aHttpInput.Content
object with data currently stored within the channel.void
setIdleTimeout
(long timeoutMs) Set the idle timeout.Methods inherited from class org.eclipse.jetty.server.HttpChannel
abort, addListener, addRequestLog, checkAndPrepareUpgrade, ensureConsumeAllOrNotPersistent, execute, formatAddrOrHost, getByteBufferPool, getBytesWritten, getCommittedMetaData, getConnection, getConnector, getEndPoint, getHttpConfiguration, getIdleTimeout, getLocalAddress, getLocalName, getLocalPort, getNextInterceptor, getRemoteAddress, getRequest, getRequestLog, getRequests, getResponse, getScheduler, getServer, getServerAuthority, getState, getTransientListeners, getTunnellingEndPoint, handle, handleException, isCommitted, isExpecting102Processing, isPersistent, isRequestCompleted, isResponseCompleted, isSendError, isTunnellingSupported, isUseInputDirectByteBuffers, isUseOutputDirectByteBuffers, newHttpOutput, onBadMessage, onCompleted, onContent, onContentComplete, onRequest, onRequestComplete, onTrailers, recycle, removeListener, resetBuffer, run, sendErrorOrAbort, sendResponse, sendResponse, sendResponseAndComplete, setRequestLog, toString, unwrap, write
-
Constructor Details
-
HttpChannelOverHTTP3
public HttpChannelOverHTTP3(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransportOverHTTP3 transport, HTTP3Stream stream, ServerHTTP3StreamConnection connection)
-
-
Method Details
-
getHttpTransport
- Overrides:
getHttpTransport
in classHttpChannel
-
setIdleTimeout
public void setIdleTimeout(long timeoutMs) Description copied from class:HttpChannel
Set the idle timeout.This is implemented as a call to
EndPoint.setIdleTimeout(long)
, but may be overridden by channels that have timeouts different from their connections.- Overrides:
setIdleTimeout
in classHttpChannel
- Parameters:
timeoutMs
- the idle timeout in milliseconds
-
isExpecting100Continue
public boolean isExpecting100Continue()- Overrides:
isExpecting100Continue
in classHttpChannel
-
continue100
Description copied from class:HttpChannel
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.- Overrides:
continue100
in classHttpChannel
- Parameters:
available
- estimate of the number of bytes that are available- Throws:
IOException
- if the InputStream cannot be created
-
onRequest
-
commit
- Overrides:
commit
in classHttpChannel
-
onDataAvailable
-
onTrailer
-
onIdleTimeout
-
onFailure
-
needContent
public boolean needContent()Description copied from class:HttpChannel
Notify the channel that content is needed. If some content is immediately available, true is returned andHttpChannel.produceContent()
has to be called and will return a non-null object. If no content is immediately available, an attempt to produce content must be made; if new content has been produced, true is returned; otherwiseHttpInput.onContentProducible()
is called once some content arrives andHttpChannel.produceContent()
can be called without returningnull
. If a failure happens, thenHttpInput.onContentProducible()
will be called and an error content will return the error on the next call toHttpChannel.produceContent()
.- Specified by:
needContent
in classHttpChannel
- Returns:
- true if content is immediately available.
-
produceContent
Description copied from class:HttpChannel
Produce aHttpInput.Content
object with data currently stored within the channel. The produced content can be special (meaning callingHttpInput.Content.isSpecial()
returns true) if the channel reached a special state, like EOF or an error. Once a special content has been returned, all subsequent calls to this method will always return a special content of the same kind andHttpChannel.needContent()
will always return true. The returned content is "raw", i.e.: not decoded.- Specified by:
produceContent
in classHttpChannel
- Returns:
- a
HttpInput.Content
object if one is immediately available without blocking, null otherwise.
-
failAllContent
Description copied from class:HttpChannel
Fail all content that is currently stored within the channel.- Specified by:
failAllContent
in classHttpChannel
- Parameters:
failure
- the failure to fail the content with.- Returns:
- true if EOF was reached while failing all content, false otherwise.
-
failed
Description copied from class:HttpChannel
Fail the channel's input.- Specified by:
failed
in classHttpChannel
- Parameters:
failure
- the failure.- Returns:
- true if the channel needs to be rescheduled.
-
eof
protected boolean eof()Description copied from class:HttpChannel
Mark the channel's input as EOF.- Specified by:
eof
in classHttpChannel
- Returns:
- true if the channel needs to be rescheduled.
-