Top Fields Constructors Methods
org.eclipse.jetty.http3.server.internal

public Class HttpStreamOverHTTP3

extends Object
implements HttpStream
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.server.HttpStream, org.eclipse.jetty.util.Callback, org.eclipse.jetty.util.thread.Invocable
Imports
java.nio.ByteBuffer, java.util.concurrent.CompletableFuture, .TimeoutException, java.util.function.BiConsumer, .Supplier, org.eclipse.jetty.http.ComplianceViolation, .HttpCompliance, .HttpException, .HttpFields, .HttpMethod, .HttpStatus, .HttpVersion, .MetaData, .Trailers, org.eclipse.jetty.http3.HTTP3ErrorCode, org.eclipse.jetty.http3.api.Stream, org.eclipse.jetty.http3.frames.DataFrame, .HeadersFrame, org.eclipse.jetty.io.Content, org.eclipse.jetty.server.HttpChannel, .HttpStream, .Request, org.eclipse.jetty.util.BufferUtil, .Callback, org.eclipse.jetty.util.thread.AutoLock, .Invocable, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private Content.Chunk
private boolean
private final ServerHTTP3StreamConnection
private final HttpChannel
private final AutoLock
private static final Logger
private MetaData.Request
private MetaData.Response
private final HTTP3StreamServer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Throwable
private Content.Chunk
public void
demand()

Implements org.eclipse.jetty.server.HttpStream.demand.

Demands more content chunks to the underlying implementation.

public void
failed(Throwable x)

Overrides default org.eclipse.jetty.util.Callback.failed.

Callback invoked when the operation fails.

public String
public long
public boolean
public boolean
private boolean
private void
public Runnable
public Runnable
public void
public Runnable
public Runnable
public void
prepareResponse(HttpFields.Mutable headers)

Implements org.eclipse.jetty.server.HttpStream.prepareResponse.

Prepare the response headers with respect to the stream.

public Content.Chunk
read()

Implements org.eclipse.jetty.server.HttpStream.read.

Reads a chunk of content, with the same semantic as Content.Source#read().

private HttpFields
public void
send(MetaData.Request request, MetaData.Response response, boolean last, ByteBuffer byteBuffer, Callback callback)

Implements org.eclipse.jetty.server.HttpStream.send.

Send response meta-data and/or data.

private void
sendContent(MetaData.Request request, ByteBuffer content, boolean lastContent, Callback callback)

private CompletableFuture<Stream>
sendDataFrame(ByteBuffer content, boolean lastContent, boolean endStream)

private void
sendHeaders(MetaData.Request request, MetaData.Response response, ByteBuffer content, boolean lastContent, Callback callback)

private CompletableFuture<Stream>
public void
public void
succeeded()

Overrides default org.eclipse.jetty.util.Callback.succeeded.

Callback invoked when the operation completes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

chunkback to summary
private Content.Chunk chunk
committedback to summary
private boolean committed
connectionback to summary
private final ServerHTTP3StreamConnection connection
httpChannelback to summary
private final HttpChannel httpChannel
lockback to summary
private final AutoLock lock
LOGback to summary
private static final Logger LOG
requestMetaDataback to summary
private MetaData.Request requestMetaData
responseMetaDataback to summary
private MetaData.Response responseMetaData
streamback to summary
private final HTTP3StreamServer stream

Constructor Detail

HttpStreamOverHTTP3back to summary
public HttpStreamOverHTTP3(ServerHTTP3StreamConnection connection, HttpChannel httpChannel, HTTP3StreamServer stream)

Method Detail

consumeAvailableback to summary
public Throwable consumeAvailable()

Implements org.eclipse.jetty.server.HttpStream.consumeAvailable.

Annotations
@Override
createChunkback to summary
private Content.Chunk createChunk(Stream.Data data)
demandback to summary
public void demand()

Implements org.eclipse.jetty.server.HttpStream.demand.

Doc from org.eclipse.jetty.server.HttpStream.demand.

Demands more content chunks to the underlying implementation.

This method is called from the implementation of Request#demand(Runnable) and when the demand can be satisfied the implementation must call HttpChannel#onContentAvailable(). If there is a problem meeting demand, then the implementation must call HttpChannel#onFailure(Throwable).

Annotations
@Override
failedback to summary
public void failed(Throwable x)

Overrides default org.eclipse.jetty.util.Callback.failed.

Doc from org.eclipse.jetty.util.Callback.failed.

Callback invoked when the operation fails.

Annotations
@Override
getIdback to summary
public String getId()

Implements org.eclipse.jetty.server.HttpStream.getId.

Annotations
@Override
getIdleTimeoutback to summary
public long getIdleTimeout()

Implements org.eclipse.jetty.server.HttpStream.getIdleTimeout.

Annotations
@Override
isCommittedback to summary
public boolean isCommitted()

Implements org.eclipse.jetty.server.HttpStream.isCommitted.

Annotations
@Override
isIdleback to summary
public boolean isIdle()
isTunnelback to summary
private boolean isTunnel(MetaData.Request request, MetaData.Response response)
onBadMessageback to summary
private void onBadMessage(HttpException x)
onDataAvailableback to summary
public Runnable onDataAvailable()
onFailureback to summary
public Runnable onFailure(Throwable failure)
onIdleTimeoutback to summary
public void onIdleTimeout(TimeoutException failure, BiConsumer<Runnable, Boolean> consumer)
onRequestback to summary
public Runnable onRequest(HeadersFrame frame)
onTrailerback to summary
public Runnable onTrailer(HeadersFrame frame)
prepareResponseback to summary
public void prepareResponse(HttpFields.Mutable headers)

Implements org.eclipse.jetty.server.HttpStream.prepareResponse.

Doc from org.eclipse.jetty.server.HttpStream.prepareResponse.

Prepare the response headers with respect to the stream. Typically this may set headers related to protocol specific behaviour (e.g. Keep-Alive for HTTP/1.0 connections).

Annotations
@Override
readback to summary
public Content.Chunk read()

Implements org.eclipse.jetty.server.HttpStream.read.

Doc from org.eclipse.jetty.server.HttpStream.read.

Reads a chunk of content, with the same semantic as Content.Source#read().

This method is called from the implementation of Request#read().

Annotations
@Override
retrieveTrailersback to summary
private HttpFields retrieveTrailers()
sendback to summary
public void send(MetaData.Request request, MetaData.Response response, boolean last, ByteBuffer byteBuffer, Callback callback)

Implements org.eclipse.jetty.server.HttpStream.send.

Doc from org.eclipse.jetty.server.HttpStream.send.

Send response meta-data and/or data.

Annotations
@Override
sendContentback to summary
private void sendContent(MetaData.Request request, ByteBuffer content, boolean lastContent, Callback callback)
sendDataFrameback to summary
private CompletableFuture<Stream> sendDataFrame(ByteBuffer content, boolean lastContent, boolean endStream)
sendHeadersback to summary
private void sendHeaders(MetaData.Request request, MetaData.Response response, ByteBuffer content, boolean lastContent, Callback callback)
sendTrailerFrameback to summary
private CompletableFuture<Stream> sendTrailerFrame(HttpFields trailers)
setIdleTimeoutback to summary
public void setIdleTimeout(long idleTimeoutMs)

Implements org.eclipse.jetty.server.HttpStream.setIdleTimeout.

Annotations
@Override
succeededback to summary
public void succeeded()

Overrides default org.eclipse.jetty.util.Callback.succeeded.

Doc from org.eclipse.jetty.util.Callback.succeeded.

Callback invoked when the operation completes.

Annotations
@Override